Module: kamailio
Branch: master
Commit: 5a74654e0b50bda887f3f00327b2d786fed30241
URL: 
https://github.com/kamailio/kamailio/commit/5a74654e0b50bda887f3f00327b2d786fed30241

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2025-07-14T08:28:21+02:00

pdb: check the result of setting the timeout via rpc

---

Modified: src/modules/pdb/pdb.c

---

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

---

diff --git a/src/modules/pdb/pdb.c b/src/modules/pdb/pdb.c
index eb6731d4ce7..5ac43f1cf9c 100644
--- a/src/modules/pdb/pdb.c
+++ b/src/modules/pdb/pdb.c
@@ -787,7 +787,10 @@ static void pdb_rpc_timeout(rpc_t *rpc, void *ctx)
                return;
        }
 
-       cfg_set_now_int(ctx, &gname, NULL, &vname, new_val);
+       if(cfg_set_now_int(ctx, &gname, NULL, &vname, new_val)) {
+               rpc->fault(ctx, 500, "Failed to set the new value");
+               return;
+       }
 }
 
 static void pdb_rpc_activate(rpc_t *rpc, void *ctx)

_______________________________________________
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!

Reply via email to