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 #3353 from mrunge/master
[collectd.git]
/
src
/
teamspeak2.c
diff --git
a/src/teamspeak2.c
b/src/teamspeak2.c
index
6d0cdbb
..
42cc54e
100644
(file)
--- a/
src/teamspeak2.c
+++ b/
src/teamspeak2.c
@@
-23,8
+23,8
@@
#include "collectd.h"
#include "collectd.h"
-#include "common.h"
#include "plugin.h"
#include "plugin.h"
+#include "utils/common/common.h"
#include <arpa/inet.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <netdb.h>
@@
-132,7
+132,8
@@
static void tss2_submit_io(const char *plugin_instance, const char *type,
*/
value_list_t vl = VALUE_LIST_INIT;
value_t values[] = {
*/
value_list_t vl = VALUE_LIST_INIT;
value_t values[] = {
- {.derive = rx}, {.derive = tx},
+ {.derive = rx},
+ {.derive = tx},
};
vl.values = values;
};
vl.values = values;
@@
-255,7
+256,7
@@
static int tss2_get_socket(FILE **ret_read_fh, FILE **ret_write_fh) {
config_host ? config_host : DEFAULT_HOST,
config_port ? config_port : DEFAULT_PORT);
}
config_host ? config_host : DEFAULT_HOST,
config_port ? config_port : DEFAULT_PORT);
}
- buffer[sizeof(buffer) - 1] =
0
;
+ buffer[sizeof(buffer) - 1] =
'\0'
;
if (memcmp("[TS]\r\n", buffer, 6) != 0) {
ERROR("teamspeak2 plugin: Unexpected response when connecting "
if (memcmp("[TS]\r\n", buffer, 6) != 0) {
ERROR("teamspeak2 plugin: Unexpected response when connecting "
@@
-309,7
+310,7
@@
static int tss2_receive_line(FILE *fh, char *buffer, int buffer_size) {
return -1;
}
return -1;
}
- buffer[buffer_size - 1] =
0
;
+ buffer[buffer_size - 1] =
'\0'
;
return 0;
} /* int tss2_receive_line */
return 0;
} /* int tss2_receive_line */
@@
-337,7
+338,7
@@
static int tss2_select_vserver(FILE *read_fh, FILE *write_fh,
ERROR("teamspeak2 plugin: tss2_receive_line failed.");
return -1;
}
ERROR("teamspeak2 plugin: tss2_receive_line failed.");
return -1;
}
- response[sizeof(response) - 1] =
0
;
+ response[sizeof(response) - 1] =
'\0'
;
/* Check answer */
if ((strncasecmp("OK", response, 2) == 0) &&
/* Check answer */
if ((strncasecmp("OK", response, 2) == 0) &&
@@
-379,7
+380,7
@@
static int tss2_vserver_gapl(FILE *read_fh, FILE *write_fh,
ERROR("teamspeak2 plugin: tss2_receive_line failed.");
return -1;
}
ERROR("teamspeak2 plugin: tss2_receive_line failed.");
return -1;
}
- buffer[sizeof(buffer) - 1] =
0
;
+ buffer[sizeof(buffer) - 1] =
'\0'
;
if (strncmp("average_packet_loss=", buffer,
strlen("average_packet_loss=")) == 0) {
if (strncmp("average_packet_loss=", buffer,
strlen("average_packet_loss=")) == 0) {