From 0363e66c74acf167dc8d03bf0ea926b43cca5cd8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petr=20P=C3=ADsa=C5=99?= Date: Thu, 14 Jan 2016 20:16:39 +0100 Subject: [PATCH] Fix building without libcurl MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit If configured --without-libcurl, compilation failed with: isds.c:11090:17: error: 'struct isds_ctx' has no member named 'curl' This was caused by misplaced condition on libcurl support. This patch fixes it together with similar mistake in offline tests. Reported by Toralf Förster from Gentoo tinderbox testing . --- src/isds.c | 2 +- test/offline/Makefile.am | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/isds.c b/src/isds.c index a10a9a7..f6532a3 100644 --- a/src/isds.c +++ b/src/isds.c @@ -11574,11 +11574,11 @@ isds_error isds_delete_message_from_storage(struct isds_ctx *context, zfree(context->long_message); if (NULL == message_id) return IE_INVAL; +#if HAVE_LIBCURL /* Check if connection is established * TODO: This check should be done downstairs. */ if (!context->curl) return IE_CONNECTION_CLOSED; -#if HAVE_LIBCURL /* Build request */ request = xmlNewNode(NULL, BAD_CAST "EraseMessage"); if (!request) { diff --git a/test/offline/Makefile.am b/test/offline/Makefile.am index 56b9452..9d0abd3 100644 --- a/test/offline/Makefile.am +++ b/test/offline/Makefile.am @@ -34,12 +34,11 @@ TESTS = prepare_environment \ isds_box_state_period_duplicate \ isds-filemetatype isds-hash_algorithm \ isds-timestring2timeval \ - isds-uint2isds_message_status isds-eventstring2event \ - isds-interpret_matches + isds-uint2isds_message_status isds-eventstring2event if BUILD_CURL TESTS += isds-dbtype isds-sendertype isds-usertype isds-paymenttype\ isds-crediteventtype isds-datestring2tm isds-tm2datestring \ - isds-timeval2timestring \ + isds-timeval2timestring isds-interpret_matches \ soap-decode_header_value soap-string2isds_otp_resolution endif -- 2.11.4.GIT