Merge branch 'collectd-4.10'
authorFlorian Forster <octo@huhu.verplant.org>
Tue, 4 Jan 2011 11:42:23 +0000 (12:42 +0100)
committerFlorian Forster <octo@huhu.verplant.org>
Tue, 4 Jan 2011 11:42:23 +0000 (12:42 +0100)
README
configure.in
src/curl_json.c
src/dns.c
src/java.c

diff --git a/README b/README
index e8b7241..811c594 100644 (file)
--- a/README
+++ b/README
@@ -573,8 +573,10 @@ Prerequisites
     <http://tangent.org/552/libmemcached.html>
 
   * libmodbus (optional)
-    Used by the `modbus' plugin to communicate with Modbus/TCP devices.
-    <https://launchpad.net/libmodbus>
+    Used by the “modbus” plugin to communicate with Modbus/TCP devices. The
+    “modbus” plugin works with version 2.0.3 of the library – due to frequent
+    API changes other versions may or may not compile cleanly.
+    <http://www.libmodbus.org/>
 
   * libmysqlclient (optional)
     Unsurprisingly used by the `mysql' plugin.
index 63402f2..f6bb58b 100644 (file)
@@ -2760,19 +2760,13 @@ then
 fi
 if test "x$with_libpcap" = "xyes"
 then
-       AC_CHECK_HEADERS(pcap.h,
-       [
-               AC_DEFINE(HAVE_PCAP_H, 1, [Define to 1 if you have the <pcap.h> header file.])
-       ], [with_libpcap="no (pcap.h not found)"])
+       AC_CHECK_HEADERS(pcap.h,,
+                        [with_libpcap="no (pcap.h not found)"])
 fi
 if test "x$with_libpcap" = "xyes"
 then
-       collect_libpcap=1
-else
-       collect_libpcap=0
+       AC_CHECK_HEADERS(pcap-bpf.h)
 fi
-AC_DEFINE_UNQUOTED(COLLECT_LIBPCAP, [$collect_libpcap],
-       [Wether or not to use the pcap library])
 AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
 # }}}
 
index 06119f1..5549f0a 100644 (file)
@@ -247,7 +247,7 @@ static int cj_cb_start_array (void * ctx)
 
 static int cj_cb_end_array (void * ctx)
 {
-  return cj_cb_start (ctx);
+  return cj_cb_end (ctx);
 }
 
 static yajl_callbacks ycallbacks = {
index f6c3504..09082fc 100644 (file)
--- a/src/dns.c
+++ b/src/dns.c
@@ -1,6 +1,6 @@
 /**
  * collectd - src/dns.c
- * Copyright (C) 2006,2007  Florian octo Forster
+ * Copyright (C) 2006-2011  Florian octo Forster
  * Copyright (C) 2009       Mirko Buffoni
  *
  * This program is free software; you can redistribute it and/or modify it
@@ -17,7 +17,7 @@
  * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  *
  * Authors:
- *   Florian octo Forster <octo at verplant.org>
+ *   Florian octo Forster <octo at collectd.org>
  *   Mirko Buffoni <briareos at eswat.org>
  **/
 
 
 #include "utils_dns.h"
 #include <pthread.h>
-#include <pcap.h>
 #include <poll.h>
 
+#include <pcap.h>
+#if HAVE_PCAP_BPF_H
+# include <pcap-bpf.h>
+#endif
+
 /*
  * Private data types
  */
@@ -206,7 +210,7 @@ static void dns_child_callback (const rfc1035_header_t *dns)
        pthread_mutex_unlock (&opcode_mutex);
 }
 
-static void *dns_child_loop (void __attribute__((unused)) *dummy)
+static void *dns_child_loop (__attribute__((unused)) void *dummy)
 {
        pcap_t *pcap_obj;
        char    pcap_error[PCAP_ERRBUF_SIZE];
index 3089a53..af0861f 100644 (file)
@@ -1932,7 +1932,9 @@ static int cjni_init_native (JNIEnv *jvm_env) /* {{{ */
   api_class_ptr = (*jvm_env)->FindClass (jvm_env, "org/collectd/api/Collectd");
   if (api_class_ptr == NULL)
   {
-    ERROR ("cjni_init_native: Cannot find API class `org/collectd/api/Collectd'.");
+    ERROR ("cjni_init_native: Cannot find the API class \"org.collectd.api"
+        ".Collectd\". Please set the correct class path "
+        "using 'JVMArg \"-Djava.class.path=...\"'.");
     return (-1);
   }