projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5752003
)
Ok it is posting to the local server
author
Chris Lundquist
<clundquist@bluebox.net>
Tue, 17 Jan 2012 05:10:46 +0000
(21:10 -0800)
committer
Chris Lundquist
<chris.lundquist@bluebox.net>
Tue, 24 Jan 2012 19:53:22 +0000
(11:53 -0800)
src/write_mongodb.c
patch
|
blob
|
history
diff --git
a/src/write_mongodb.c
b/src/write_mongodb.c
index
900fb87
..
5ee220e
100644
(file)
--- 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);
}
+
}