projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Properly cleanup dropped MySQL connections.
[collectd.git]
/
src
/
routeros.c
diff --git
a/src/routeros.c
b/src/routeros.c
index
9ea8297
..
ec8956c
100644
(file)
--- a/
src/routeros.c
+++ b/
src/routeros.c
@@
-230,9
+230,7
@@
static int cr_read(user_data_t *user_data) /* {{{ */
rd->connection =
ros_connect(rd->node, rd->service, rd->username, rd->password);
if (rd->connection == NULL) {
rd->connection =
ros_connect(rd->node, rd->service, rd->username, rd->password);
if (rd->connection == NULL) {
- char errbuf[128];
- ERROR("routeros plugin: ros_connect failed: %s",
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ ERROR("routeros plugin: ros_connect failed: %s", STRERRNO);
return -1;
}
}
return -1;
}
}
@@
-242,9
+240,7
@@
static int cr_read(user_data_t *user_data) /* {{{ */
status = ros_interface(rd->connection, handle_interface,
/* user data = */ rd);
if (status != 0) {
status = ros_interface(rd->connection, handle_interface,
/* user data = */ rd);
if (status != 0) {
- char errbuf[128];
- ERROR("routeros plugin: ros_interface failed: %s",
- sstrerror(status, errbuf, sizeof(errbuf)));
+ ERROR("routeros plugin: ros_interface failed: %s", STRERROR(status));
ros_disconnect(rd->connection);
rd->connection = NULL;
return -1;
ros_disconnect(rd->connection);
rd->connection = NULL;
return -1;
@@
-255,9
+251,8
@@
static int cr_read(user_data_t *user_data) /* {{{ */
status = ros_registration_table(rd->connection, handle_regtable,
/* user data = */ rd);
if (status != 0) {
status = ros_registration_table(rd->connection, handle_regtable,
/* user data = */ rd);
if (status != 0) {
- char errbuf[128];
ERROR("routeros plugin: ros_registration_table failed: %s",
ERROR("routeros plugin: ros_registration_table failed: %s",
-
sstrerror(status, errbuf, sizeof(errbuf)
));
+
STRERROR(status
));
ros_disconnect(rd->connection);
rd->connection = NULL;
return -1;
ros_disconnect(rd->connection);
rd->connection = NULL;
return -1;
@@
-270,9
+265,8
@@
static int cr_read(user_data_t *user_data) /* {{{ */
status = ros_system_resource(rd->connection, handle_system_resource,
/* user data = */ rd);
if (status != 0) {
status = ros_system_resource(rd->connection, handle_system_resource,
/* user data = */ rd);
if (status != 0) {
- char errbuf[128];
ERROR("routeros plugin: ros_system_resource failed: %s",
ERROR("routeros plugin: ros_system_resource failed: %s",
-
sstrerror(status, errbuf, sizeof(errbuf)
));
+
STRERROR(status
));
ros_disconnect(rd->connection);
rd->connection = NULL;
return -1;
ros_disconnect(rd->connection);
rd->connection = NULL;
return -1;