From 30a056bd15de18ac1d394df0c32aa966765831b8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petr=20P=C3=ADsa=C5=99?= Date: Mon, 15 Feb 2010 20:18:09 +0100 Subject: [PATCH] Fix CZP curl context handling --- src/isds.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/isds.c b/src/isds.c index 2bcf1f6..822c4d5 100644 --- a/src/isds.c +++ b/src/isds.c @@ -868,6 +868,7 @@ isds_error isds_login(struct isds_ctx *context, const char *url, if (certificate || key) return IE_NOTSUP; /* Store configuration */ + context->type = CTX_TYPE_ISDS; free(context->url); context->url = strdup(url); if (!(context->url)) @@ -8075,6 +8076,7 @@ isds_error czp_convert_document(struct isds_ctx *context, zfree(*date); /* Store configuration */ + context->type = CTX_TYPE_CZP; free(context->url); context->url = strdup("https://www.czechpoint.cz/uschovna/services.php"); if (!(context->url)) @@ -8082,7 +8084,7 @@ isds_error czp_convert_document(struct isds_ctx *context, url_locale = utf82locale((char *) context->url); /* Prepare CURL handle if not yet connected */ - if (context->curl) { + if (!context->curl) { context->curl = curl_easy_init(); if (!(context->curl)) return IE_ERROR; -- 2.11.4.GIT