Module: kamailio
Branch: master
Commit: 27fdee6b47ce609ee5913f9aa9355a2c01ec0458
URL:
https://github.com/kamailio/kamailio/commit/27fdee6b47ce609ee5913f9aa9355a2…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-01-15T08:54:44+01:00
dispatcher: test len for matching all token in setting the state via rpc
---
Modified: src/modules/dispatcher/dispatcher.c
---
Diff:
https://github.com/kamailio/kamailio/commit/27fdee6b47ce609ee5913f9aa9355a2…
Patch:
https://github.com/kamailio/kamailio/commit/27fdee6b47ce609ee5913f9aa9355a2…
---
diff --git a/src/modules/dispatcher/dispatcher.c b/src/modules/dispatcher/dispatcher.c
index 40c47c3e1f..efb3a18001 100644
--- a/src/modules/dispatcher/dispatcher.c
+++ b/src/modules/dispatcher/dispatcher.c
@@ -1360,7 +1360,7 @@ static void dispatcher_rpc_set_state(rpc_t *rpc, void *ctx)
return;
}
- if(strcmp(dest.s, "all") == 0) {
+ if(dest.len == 3 && strncmp(dest.s, "all", 3) == 0) {
ds_reinit_state_all(group, stval);
} else {
if(ds_reinit_state(group, &dest, stval) < 0) {