Module: kamailio
Branch: master
Commit: 583ab9f29cd7d5c472de2e12087a4c619bc1897f
URL:
https://github.com/kamailio/kamailio/commit/583ab9f29cd7d5c472de2e12087a4c6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-08-06T10:23:27+02:00
dispatcher: variables declared at beginning of block
---
Modified: src/modules/dispatcher/dispatcher.c
---
Diff:
https://github.com/kamailio/kamailio/commit/583ab9f29cd7d5c472de2e12087a4c6…
Patch:
https://github.com/kamailio/kamailio/commit/583ab9f29cd7d5c472de2e12087a4c6…
---
diff --git a/src/modules/dispatcher/dispatcher.c b/src/modules/dispatcher/dispatcher.c
index 4eefbff1ce3..42fb1e45d68 100644
--- a/src/modules/dispatcher/dispatcher.c
+++ b/src/modules/dispatcher/dispatcher.c
@@ -1962,6 +1962,8 @@ static void dispatcher_rpc_list(rpc_t *rpc, void *ctx)
int n;
str smode;
int vmode = DS_RPC_PRINT_NORMAL;
+ ds_set_t *dslist = NULL;
+ int dslistnr = 0;
n = rpc->scan(ctx, "*S", &smode);
if(n == 1) {
@@ -1972,8 +1974,8 @@ static void dispatcher_rpc_list(rpc_t *rpc, void *ctx)
}
}
- ds_set_t *dslist = ds_get_list();
- int dslistnr = ds_get_list_nr();
+ dslist = ds_get_list();
+ dslistnr = ds_get_list_nr();
if(dslist == NULL || dslistnr <= 0) {
LM_DBG("no destination sets\n");