From 31a153c2bdf8e2ff270b58238cde64a15d2dfe6a Mon Sep 17 00:00:00 2001 From: Paul Sadauskas Date: Mon, 6 Jul 2009 14:15:29 -0600 Subject: [PATCH] tokyotyrant plugin: Don't need to pass the db handle around, its global. --- src/tokyotyrant.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/tokyotyrant.c b/src/tokyotyrant.c index 87001a05..160bf667 100644 --- a/src/tokyotyrant.c +++ b/src/tokyotyrant.c @@ -78,7 +78,7 @@ static int tt_config (const char *key, const char *value) return (0); } -static void printerr(TCRDB *rdb) +static void printerr() { 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); - size = tcrdbsize(rdb); tt_submit (rnum, "records"); + + size = tcrdbsize(rdb); tt_submit (size, "file_size"); return (0); @@ -127,7 +128,7 @@ static int tt_init(void) if (!tcrdbopen(rdb, host, port)) { - printerr (rdb); + printerr (); tcrdbdel (rdb); return (1); } @@ -142,7 +143,7 @@ static int tt_shutdown(void) if (!tcrdbclose(rdb)) { - printerr (rdb); + printerr (); tcrdbdel (rdb); return (1); } -- 2.30.2