[sr-dev] git:master:30079910: dispatcher: fix ds_reload() return logic

Daniel-Constantin Mierla miconda at gmail.com
Mon Mar 14 17:08:29 CET 2022


Module: kamailio
Branch: master
Commit: 30079910bbb33b430621f188beae40c71592bcba
URL: https://github.com/kamailio/kamailio/commit/30079910bbb33b430621f188beae40c71592bcba

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2022-03-14T17:07:42+01:00

dispatcher: fix ds_reload() return logic

- GH #3054

---

Modified: src/modules/dispatcher/dispatcher.c

---

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

---

diff --git a/src/modules/dispatcher/dispatcher.c b/src/modules/dispatcher/dispatcher.c
index 059df89123..83d6b45ee9 100644
--- a/src/modules/dispatcher/dispatcher.c
+++ b/src/modules/dispatcher/dispatcher.c
@@ -963,13 +963,15 @@ static int ds_reload(sip_msg_t *msg)
 	*ds_rpc_reload_time = time(NULL);
 
 	if(!ds_db_url.s) {
-		if(ds_load_list(dslistfile) != 0)
+		if(ds_load_list(dslistfile) != 0) {
 			LM_ERR("Error reloading from list\n");
-		return -1;
+			return -1;
+		}
 	} else {
-		if(ds_reload_db() < 0)
+		if(ds_reload_db() < 0) {
 			LM_ERR("Error reloading from db\n");
-		return -1;
+			return -1;
+		}
 	}
 	LM_DBG("reloaded dispatcher\n");
 	return 1;




More information about the sr-dev mailing list