Quellcode durchsuchen

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)
mikomarrache vor 10 Jahren
Ursprung
Commit
1c77a5acad
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      modules/db_mongodb/mongodb_dbase.c

+ 2 - 2
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;
 	}