From 731f60bad6b6b051731f88051fa32876f2be6a45 Mon Sep 17 00:00:00 2001 From: Chris Lundquist Date: Mon, 16 Jan 2012 21:10:46 -0800 Subject: [PATCH] Ok it is posting to the local server --- src/write_mongodb.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/write_mongodb.c b/src/write_mongodb.c index 900fb878..5ee220e1 100644 --- a/src/write_mongodb.c +++ b/src/write_mongodb.c @@ -101,6 +101,7 @@ static int wm_write (const data_set_t *ds, /* {{{ */ else assert (23 == 42); } + bson_finish(&record); pthread_mutex_lock (&node->lock); @@ -137,11 +138,15 @@ static int wm_write (const data_set_t *ds, /* {{{ */ if(status != MONGO_OK) { - ERROR ( "write_mongodb plugin: error inserting record: "); + ERROR ( "write_mongodb plugin: error inserting record: %d", node->conn->err); if(node->conn->err == MONGO_BSON_INVALID) { + ERROR (node->conn->errstr); + } else if ( record.err) + { ERROR (record.errstr); } + } -- 2.11.0