From: octo Date: Fri, 21 Apr 2006 07:13:49 +0000 (+0000) Subject: Merged revision 6.4.5 from `trunk' to `tags/collectd-3.9.1' X-Git-Tag: collectd-3.8.6^2~13 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=8dca6a24c86f49e5f03e5f69a224db56de58c6f6;p=collectd.git Merged revision 6.4.5 from `trunk' to `tags/collectd-3.9.1' --- diff --git a/src/apache.c b/src/apache.c index c410dc43..c731908a 100644 --- a/src/apache.c +++ b/src/apache.c @@ -38,13 +38,13 @@ static char *url = NULL; static char *user = NULL; static char *pass = NULL; -#if APACHE_HAVE_READ +#if HAVE_LIBCURL static CURL *curl = NULL; static char apache_buffer[4096]; static int apache_buffer_len = 0; static char apache_curl_error[CURL_ERROR_SIZE]; -#endif +#endif /* HAVE_LIBCURL */ /* Limit to 2^27 bytes/s. That's what a gigabit-ethernet link can handle, in * theory. */ @@ -82,7 +82,7 @@ static char *config_keys[] = }; static int config_keys_num = 3; - +#if HAVE_LIBCURL static size_t apache_curl_callback (void *buf, size_t size, size_t nmemb, void *stream) { size_t len = size * nmemb; @@ -101,6 +101,7 @@ static size_t apache_curl_callback (void *buf, size_t size, size_t nmemb, void * return (len); } +#endif /* HAVE_LIBCURL */ static int config_set (char **var, char *value) { @@ -130,7 +131,7 @@ static int config (char *key, char *value) static void init (void) { -#if APACHE_HAVE_READ +#if HAVE_LIBCURL static char credentials[1024]; if (curl != NULL) @@ -163,7 +164,7 @@ static void init (void) { curl_easy_setopt (curl, CURLOPT_URL, url); } -#endif /* APACHE_HAVE_READ */ +#endif /* HAVE_LIBCURL */ } static void bytes_write (char *host, char *inst, char *val)