[sr-dev] [kamailio/kamailio] Dispatcher ds_reload() function always returns error (Issue #3054)
kdanderso
notifications at github.com
Mon Mar 14 15:57:03 CET 2022
### Description
The ds_reload() function in dispatcher.c always returns -1, even when successful.
### Possible Solutions
I think a patch like the following would resolve the issue.
```
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;
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
5.5.3
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3054
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3054 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20220314/31dce8a5/attachment.htm>
More information about the sr-dev
mailing list