projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tokyotyrant plugin: Don't need to pass the db handle around, its global.
[collectd.git]
/
src
/
tokyotyrant.c
diff --git
a/src/tokyotyrant.c
b/src/tokyotyrant.c
index
87001a0
..
160bf66
100644
(file)
--- a/
src/tokyotyrant.c
+++ b/
src/tokyotyrant.c
@@
-78,7
+78,7
@@
static int tt_config (const char *key, const char *value)
return (0);
}
return (0);
}
-static void printerr(
TCRDB *rdb
)
+static void printerr()
{
int ecode = tcrdbecode(rdb);
ERROR ("tokyotyrant plugin: error: %d, %s",
{
int ecode = tcrdbecode(rdb);
ERROR ("tokyotyrant plugin: error: %d, %s",
@@
-108,8
+108,9
@@
static int tt_read (void) {
gauge_t rnum, size;
rnum = tcrdbrnum(rdb);
gauge_t rnum, size;
rnum = tcrdbrnum(rdb);
- size = tcrdbsize(rdb);
tt_submit (rnum, "records");
tt_submit (rnum, "records");
+
+ size = tcrdbsize(rdb);
tt_submit (size, "file_size");
return (0);
tt_submit (size, "file_size");
return (0);
@@
-127,7
+128,7
@@
static int tt_init(void)
if (!tcrdbopen(rdb, host, port))
{
if (!tcrdbopen(rdb, host, port))
{
- printerr (
rdb
);
+ printerr ();
tcrdbdel (rdb);
return (1);
}
tcrdbdel (rdb);
return (1);
}
@@
-142,7
+143,7
@@
static int tt_shutdown(void)
if (!tcrdbclose(rdb))
{
if (!tcrdbclose(rdb))
{
- printerr (
rdb
);
+ printerr ();
tcrdbdel (rdb);
return (1);
}
tcrdbdel (rdb);
return (1);
}