projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #1580 from rubenk/freebsd-zfs-arc
[collectd.git]
/
src
/
network.c
diff --git
a/src/network.c
b/src/network.c
index
04dffe8
..
0ee6ed0
100644
(file)
--- a/
src/network.c
+++ b/
src/network.c
@@
-22,6
+22,7
@@
* Aman Gupta <aman at tmm1.net>
**/
* Aman Gupta <aman at tmm1.net>
**/
+#define _DEFAULT_SOURCE
#define _BSD_SOURCE /* For struct ip_mreq */
#include "collectd.h"
#define _BSD_SOURCE /* For struct ip_mreq */
#include "collectd.h"
@@
-2415,7
+2416,7
@@
static int network_receive (void) /* {{{ */
int buffer_len;
int i;
int buffer_len;
int i;
- int status;
+ int status
= 0
;
receive_list_entry_t *private_list_head;
receive_list_entry_t *private_list_tail;
receive_list_entry_t *private_list_head;
receive_list_entry_t *private_list_tail;
@@
-2538,10
+2539,6
@@
static int network_receive (void) /* {{{ */
receive_list_tail = private_list_tail;
receive_list_length += private_list_length;
receive_list_tail = private_list_tail;
receive_list_length += private_list_length;
- private_list_head = NULL;
- private_list_tail = NULL;
- private_list_length = 0;
-
pthread_cond_signal (&receive_list_cond);
pthread_mutex_unlock (&receive_list_lock);
}
pthread_cond_signal (&receive_list_cond);
pthread_mutex_unlock (&receive_list_lock);
}
@@
-2989,7
+2986,7
@@
static int network_config_set_ttl (const oconfig_item_t *ci) /* {{{ */
network_config_ttl = tmp;
else {
WARNING ("network plugin: The `TimeToLive' must be between 1 and 255.");
network_config_ttl = tmp;
else {
WARNING ("network plugin: The `TimeToLive' must be between 1 and 255.");
- return (-1);
+ return (-1);
}
return (0);
}
return (0);