projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
159ed49
)
tokyotyrant plugin: Don't need to pass the db handle around, its global.
author
Paul Sadauskas
<psadauskas@gmail.com>
Mon, 6 Jul 2009 20:15:29 +0000
(14:15 -0600)
committer
Florian Forster
<octo@leeloo.lan.home.verplant.org>
Mon, 6 Jul 2009 20:40:08 +0000
(22:40 +0200)
src/tokyotyrant.c
patch
|
blob
|
history
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);
}