Module: kamailio
Branch: 4.2
Commit: 1c77a5acada0cdf66e05b754ae232e8efa624be2
URL:
https://github.com/kamailio/kamailio/commit/1c77a5acada0cdf66e05b754ae232e8…
Author: mikomarrache <mikomarrache(a)users.noreply.github.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-02-12T09:51:47+01:00
db_mongo_db: use mongoc_collection_update() for update operation
- used instead of mongoc_collection_find_and_modify(), which returns the
document, but it is not needed
(cherry picked from commit e31e4632f83e805775bbc1e208178bee11ab137b)
---
Modified: modules/db_mongodb/mongodb_dbase.c
---
Diff:
https://github.com/kamailio/kamailio/commit/1c77a5acada0cdf66e05b754ae232e8…
Patch:
https://github.com/kamailio/kamailio/commit/1c77a5acada0cdf66e05b754ae232e8…
---
diff --git a/modules/db_mongodb/mongodb_dbase.c b/modules/db_mongodb/mongodb_dbase.c
index 808575b..5acc269 100644
--- a/modules/db_mongodb/mongodb_dbase.c
+++ b/modules/db_mongodb/mongodb_dbase.c
@@ -1226,8 +1226,8 @@ int db_mongodb_update(const db1_con_t* _h, const db_key_t* _k,
}
}
- if (!mongoc_collection_find_and_modify (collection, mdoc, NULL, udoc, NULL,
- false, false, false, NULL, &error)) {
+ if (!mongoc_collection_update (collection, MONGOC_UPDATE_NONE, mdoc,
+ udoc, NULL, &error)) {
LM_ERR("failed to update in collection: %s\n", error.message);
goto error;
}