Module: kamailio
Branch: 5.3
Commit: 1bccb817c20f02665d48a38eb59a57a6ae17b81f
URL:
https://github.com/kamailio/kamailio/commit/1bccb817c20f02665d48a38eb59a57a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-09-14T09:33:16+02:00
dispatcher: update state if sending keepalive OPTIONS fails
- backport of 4584e17b98f338916cc89dac6e1700f250cdf501
---
Modified: src/modules/dispatcher/dispatch.c
---
Diff:
https://github.com/kamailio/kamailio/commit/1bccb817c20f02665d48a38eb59a57a…
Patch:
https://github.com/kamailio/kamailio/commit/1bccb817c20f02665d48a38eb59a57a…
---
diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c
index d66a48e919..aa563a984b 100644
--- a/src/modules/dispatcher/dispatch.c
+++ b/src/modules/dispatcher/dispatch.c
@@ -3252,6 +3252,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;
@@ -3300,6 +3301,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);
+ }
}
}
}