Module: kamailio
Branch: master
Commit: abdd0bfaf6a2e50fb96e2f522f03a65f331b57b5
URL:
https://github.com/kamailio/kamailio/commit/abdd0bfaf6a2e50fb96e2f522f03a65…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-07-16T10:10:06+02:00
dispatcher: new flag 32 to not send ping to destination
---
Modified: src/modules/dispatcher/dispatch.c
Modified: src/modules/dispatcher/dispatch.h
---
Diff:
https://github.com/kamailio/kamailio/commit/abdd0bfaf6a2e50fb96e2f522f03a65…
Patch:
https://github.com/kamailio/kamailio/commit/abdd0bfaf6a2e50fb96e2f522f03a65…
---
diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c
index d36141bbafd..287164f829d 100644
--- a/src/modules/dispatcher/dispatch.c
+++ b/src/modules/dispatcher/dispatch.c
@@ -4069,6 +4069,9 @@ void ds_ping_set(ds_set_t *node)
/* skip addresses set in disabled state by admin */
if((node->dlist[j].flags & DS_DISABLED_DST) != 0)
continue;
+ /* skip addresses with no-ping flag */
+ if((node->dlist[j].flags & DS_NOPING_DST) != 0)
+ continue;
/* If the Flag of the entry has "Probing set, send a probe: */
if(ds_ping_result_helper(node, j)) {
LM_DBG("probing set #%d, URI %.*s\n", node->id,
diff --git a/src/modules/dispatcher/dispatch.h b/src/modules/dispatcher/dispatch.h
index 06410225a62..cf1842aeb47 100644
--- a/src/modules/dispatcher/dispatch.h
+++ b/src/modules/dispatcher/dispatch.h
@@ -46,7 +46,8 @@
#define DS_DISABLED_DST 4 /*!< admin disabled destination */
#define DS_PROBING_DST 8 /*!< checking destination */
#define DS_NODNSARES_DST 16 /*!< no DNS A/AAAA resolve for host in uri */
-#define DS_STATES_ALL 31 /*!< all bits for the states of destination */
+#define DS_NOPING_DST 32 /*!< no ping to destination */
+#define DS_STATES_ALL 63 /*!< all bits for the states of destination */
#define ds_skip_dst(flags) ((flags) & (DS_INACTIVE_DST|DS_DISABLED_DST))