projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
uuid plugin: Pass `int' to `isxdigit'.
[collectd.git]
/
src
/
dns.c
diff --git
a/src/dns.c
b/src/dns.c
index
69cb192
..
4d3106b
100644
(file)
--- a/
src/dns.c
+++ b/
src/dns.c
@@
-212,7
+212,7
@@
static void *dns_child_loop (void *dummy)
/* Passing `pcap_device == NULL' is okay and the same as passign "any" */
DEBUG ("Creating PCAP object..");
/* Passing `pcap_device == NULL' is okay and the same as passign "any" */
DEBUG ("Creating PCAP object..");
- pcap_obj = pcap_open_live (
pcap_device
,
+ pcap_obj = pcap_open_live (
(pcap_device != NULL) ? pcap_device : "any"
,
PCAP_SNAPLEN,
0 /* Not promiscuous */,
interval_g,
PCAP_SNAPLEN,
0 /* Not promiscuous */,
interval_g,
@@
-301,9
+301,10
@@
static void submit_counter (const char *type, const char *type_instance,
vl.time = time (NULL);
sstrncpy (vl.host, hostname_g, sizeof (vl.host));
sstrncpy (vl.plugin, "dns", sizeof (vl.plugin));
vl.time = time (NULL);
sstrncpy (vl.host, hostname_g, sizeof (vl.host));
sstrncpy (vl.plugin, "dns", sizeof (vl.plugin));
- strncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
+ sstrncpy (vl.type, type, sizeof (vl.type));
+ sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
- plugin_dispatch_values (
type,
&vl);
+ plugin_dispatch_values (&vl);
} /* void submit_counter */
static void submit_octets (counter_t queries, counter_t responses)
} /* void submit_counter */
static void submit_octets (counter_t queries, counter_t responses)
@@
-319,8
+320,9
@@
static void submit_octets (counter_t queries, counter_t responses)
vl.time = time (NULL);
sstrncpy (vl.host, hostname_g, sizeof (vl.host));
sstrncpy (vl.plugin, "dns", sizeof (vl.plugin));
vl.time = time (NULL);
sstrncpy (vl.host, hostname_g, sizeof (vl.host));
sstrncpy (vl.plugin, "dns", sizeof (vl.plugin));
+ sstrncpy (vl.type, "dns_octets", sizeof (vl.type));
- plugin_dispatch_values (
"dns_octets",
&vl);
+ plugin_dispatch_values (&vl);
} /* void submit_counter */
static int dns_read (void)
} /* void submit_counter */
static int dns_read (void)