[sr-dev] git:master:dca29a87: db_mongodb: use STR_VTOZ() macro

2024-12-01 Thread Daniel-Constantin Mierla via sr-dev
Module: kamailio
Branch: master
Commit: dca29a87467fd074bcb63a5f20b6834a87fadc5f
URL: 
https://github.com/kamailio/kamailio/commit/dca29a87467fd074bcb63a5f20b6834a87fadc5f

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2024-12-01T09:02:12+01:00

db_mongodb: use STR_VTOZ() macro

---

Modified: src/modules/ndb_mongodb/mongodb_client.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/dca29a87467fd074bcb63a5f20b6834a87fadc5f.diff
Patch: 
https://github.com/kamailio/kamailio/commit/dca29a87467fd074bcb63a5f20b6834a87fadc5f.patch

---

diff --git a/src/modules/ndb_mongodb/mongodb_client.c 
b/src/modules/ndb_mongodb/mongodb_client.c
index 94d1b87500b..6f4818a712f 100644
--- a/src/modules/ndb_mongodb/mongodb_client.c
+++ b/src/modules/ndb_mongodb/mongodb_client.c
@@ -252,14 +252,13 @@ int mongodbc_exec_cmd(
mongoc_client_get_collection(rsrv->client, dname->s, 
cname->s);
 
LM_DBG("trying to execute: [[%.*s]]\n", cmd->len, cmd->s);
-   c = cmd->s[cmd->len];
-   cmd->s[cmd->len] = '\0';
+   STR_VTOZ(cmd->s[cmd->len], c);
if(!bson_init_from_json(&command, cmd->s, cmd->len, &error)) {
cmd->s[cmd->len] = c;
LM_ERR("Failed to run command: %s\n", error.message);
goto error_exec;
}
-   cmd->s[cmd->len] = c;
+   STR_ZTOV(cmd->s[cmd->len], c);
if(emode == 0) {
ret = mongoc_collection_command_simple(
rpl->collection, &command, NULL, &reply, 
&error);

___
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!


[sr-dev] Re: [kamailio/kamailio] db_mongodb: build warning on CentOS 10 (Issue #4037)

2024-12-01 Thread sergey-safarov via sr-dev
Now sources compiled without warnings.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4037#issuecomment-2509749598
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!