Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 436538
Collapse All | Expand All

(-)a/src/write_mongodb.c (-1 / +8 lines)
Lines 195-201 static int wm_write (const data_set_t *ds, /* {{{ */ Link Here
195
  /* Assert if the connection has been established */
195
  /* Assert if the connection has been established */
196
  assert (mongo_is_connected (node->conn));
196
  assert (mongo_is_connected (node->conn));
197
197
198
  status = mongo_insert (node->conn, collection_name, bson_record);
198
  #if MONGO_MINOR >= 6
199
    /* There was an API change in 0.6.0 as linked below */
200
    /* https://github.com/mongodb/mongo-c-driver/blob/master/HISTORY.md */
201
    status = mongo_insert (node->conn, collection_name, bson_record, NULL);
202
  #else
203
    status = mongo_insert (node->conn, collection_name, bson_record);
204
  #endif
205
199
  if(status != MONGO_OK)
206
  if(status != MONGO_OK)
200
  {
207
  {
201
    ERROR ( "write_mongodb plugin: error inserting record: %d", node->conn->err);
208
    ERROR ( "write_mongodb plugin: error inserting record: %d", node->conn->err);

Return to bug 436538