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 #3078 from nward/document_snmp_complex_reads
[collectd.git]
/
src
/
network.c
diff --git
a/src/network.c
b/src/network.c
index
d602dfc
..
f6f0ac1
100644
(file)
--- a/
src/network.c
+++ b/
src/network.c
@@
-27,8
+27,8
@@
#include "collectd.h"
#include "collectd.h"
-#include "common.h"
#include "plugin.h"
#include "plugin.h"
+#include "utils/common/common.h"
#include "utils_cache.h"
#include "utils_complain.h"
#include "utils_fbhash.h"
#include "utils_cache.h"
#include "utils_complain.h"
#include "utils_fbhash.h"
@@
-403,7
+403,7
@@
static int network_dispatch_values(value_list_t *vl, /* {{{ */
#if COLLECT_DEBUG
char name[6 * DATA_MAX_NAME_LEN];
FORMAT_VL(name, sizeof(name), vl);
#if COLLECT_DEBUG
char name[6 * DATA_MAX_NAME_LEN];
FORMAT_VL(name, sizeof(name), vl);
- name[sizeof(name) - 1] =
0
;
+ name[sizeof(name) - 1] =
'\0'
;
DEBUG("network plugin: network_dispatch_values: "
"NOT dispatching %s.",
name);
DEBUG("network plugin: network_dispatch_values: "
"NOT dispatching %s.",
name);
@@
-1728,10
+1728,9
@@
static int network_bind_socket(int fd, const struct addrinfo *ai,
#else
int loop = 0;
#endif
#else
int loop = 0;
#endif
- int yes = 1;
/* allow multiple sockets to use the same PORT number */
/* allow multiple sockets to use the same PORT number */
- if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &
yes, sizeof(yes
)) == -1) {
+ if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &
(int){1}, sizeof(int
)) == -1) {
ERROR("network plugin: setsockopt (reuseaddr): %s", STRERRNO);
return -1;
}
ERROR("network plugin: setsockopt (reuseaddr): %s", STRERRNO);
return -1;
}
@@
-2641,7
+2640,7
@@
static int network_write(const data_set_t *ds, const value_list_t *vl,
#if COLLECT_DEBUG
char name[6 * DATA_MAX_NAME_LEN];
FORMAT_VL(name, sizeof(name), vl);
#if COLLECT_DEBUG
char name[6 * DATA_MAX_NAME_LEN];
FORMAT_VL(name, sizeof(name), vl);
- name[sizeof(name) - 1] =
0
;
+ name[sizeof(name) - 1] =
'\0'
;
DEBUG("network plugin: network_write: "
"NOT sending %s.",
name);
DEBUG("network plugin: network_write: "
"NOT sending %s.",
name);