Skip to content

Commit

Permalink
dispatcher: update state if sending keepalive OPTIONS fails
Browse files Browse the repository at this point in the history
- backport of 4584e17

(cherry picked from commit 1bccb81)
  • Loading branch information
miconda committed Sep 14, 2020
1 parent 916110d commit 01d814b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/modules/dispatcher/dispatch.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
}
}
}
Expand Down

0 comments on commit 01d814b

Please sign in to comment.