diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c index 77294c7782c..23625e87d1f 100644 --- a/src/modules/dispatcher/dispatch.c +++ b/src/modules/dispatcher/dispatch.c @@ -3095,6 +3095,7 @@ void ds_ping_set(ds_set_t *node) uac_req_t uac_r; int i, j; str ping_from; + int state; if(!node) return; @@ -3144,6 +3145,18 @@ void ds_ping_set(ds_set_t *node) < 0) { LM_ERR("unable to ping [%.*s]\n", node->dlist[j].uri.len, node->dlist[j].uri.s); + state = DS_TRYING_DST; + if(ds_probing_mode != DS_PROBE_NONE) { + state |= DS_PROBING_DST; + } + /* check if meantime someone disabled the target via RPC */ + if(!(node->dlist[j].flags & DS_DISABLED_DST) + && ds_update_state(NULL, node->id, &node->dlist[j].uri, + state) != 0) { + LM_ERR("Setting the probing state failed (%.*s, group %d)\n", + node->dlist[j].uri.len, node->dlist[j].uri.s, + node->id); + } } } }