<p></p>
<h3 dir="auto">Description</h3>
<p dir="auto">The ds_reload() function in dispatcher.c always returns -1, even when successful.</p>
<h3 dir="auto">Possible Solutions</h3>
<p dir="auto">I think a patch like the following would resolve the issue.</p>
<pre><code>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;
</code></pre>
<h3 dir="auto">Additional Information</h3>
<ul dir="auto">
<li><strong>Kamailio Version</strong> - output of <code>kamailio -v</code></li>
</ul>
<pre><code>5.5.3
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/3054">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZPR7R36JX3NTSQ7KFDU75HT7ANCNFSM5QVZJ7WA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/ABO7UZL53KWPXW4KOWF7Y2DU75HT7A5CNFSM5QVZJ7WKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4RNF4K6A.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><kamailio/kamailio/issues/3054</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/3054",
"url": "https://github.com/kamailio/kamailio/issues/3054",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>