[sr-dev] git:5.0:23783b89: htable: close db connection in some error cases for rpc command
Daniel-Constantin Mierla
miconda at gmail.com
Wed May 3 09:00:05 CEST 2017
Module: kamailio
Branch: 5.0
Commit: 23783b89d800ce75f3655a253e1d21c5fd8cad6c
URL: https://github.com/kamailio/kamailio/commit/23783b89d800ce75f3655a253e1d21c5fd8cad6c
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-05-03T08:58:16+02:00
htable: close db connection in some error cases for rpc command
(cherry picked from commit 1051a1bbc70cf84d6ebd7aa76a9b1ebd2e17e710)
---
Modified: src/modules/htable/htable.c
---
Diff: https://github.com/kamailio/kamailio/commit/23783b89d800ce75f3655a253e1d21c5fd8cad6c.diff
Patch: https://github.com/kamailio/kamailio/commit/23783b89d800ce75f3655a253e1d21c5fd8cad6c.patch
---
diff --git a/src/modules/htable/htable.c b/src/modules/htable/htable.c
index d04143d..8f79c77 100644
--- a/src/modules/htable/htable.c
+++ b/src/modules/htable/htable.c
@@ -1030,12 +1030,14 @@ static void htable_rpc_reload(rpc_t* rpc, void* c)
if (rpc->scan(c, "S", &htname) < 1)
{
+ ht_db_close_con();
rpc->fault(c, 500, "No htable name given");
return;
}
ht = ht_get_table(&htname);
if(ht==NULL)
{
+ ht_db_close_con();
rpc->fault(c, 500, "No such htable");
return;
}
More information about the sr-dev
mailing list