summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 44733bb)
raw | patch | inline | side by side (parent: 44733bb)
author | Florian Forster <octo@collectd.org> | |
Wed, 25 Jan 2012 10:51:13 +0000 (11:51 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Wed, 25 Jan 2012 10:51:13 +0000 (11:51 +0100) |
Change-Id: Ia18cfa8ea7ef8536957c0807112620d2e0e2a976
src/write_mongodb.c | patch | blob | history |
diff --git a/src/write_mongodb.c b/src/write_mongodb.c
index 510caf90bb5391b798b399dfc2c828d84e9e6c08..704ac0710382af0ed994b7b035a295f8200f3044 100644 (file)
--- a/src/write_mongodb.c
+++ b/src/write_mongodb.c
if(status != MONGO_OK)
{
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);
- }
-
+ if (node->conn->err == MONGO_BSON_INVALID)
+ ERROR ("write_mongodb plugin: %s", node->conn->errstr);
+ else if (record.err)
+ ERROR ("write_mongodb plugin: %s", record.errstr);
}
-
pthread_mutex_unlock (&node->lock);
return (0);