Module: kamailio Branch: master Commit: e1fef0016d6162c4177c0d05cefdf0546685d183 URL: https://github.com/kamailio/kamailio/commit/e1fef0016d6162c4177c0d05cefdf054...
Author: Stefan Mititelu stefan.mititelu@net2phone.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2025-02-21T08:53:34+01:00
dmq: add new api function
To return the dmq local server socket address.
---
Modified: src/modules/dmq/bind_dmq.c Modified: src/modules/dmq/bind_dmq.h Modified: src/modules/dmq/dmq_funcs.c Modified: src/modules/dmq/dmq_funcs.h
---
Diff: https://github.com/kamailio/kamailio/commit/e1fef0016d6162c4177c0d05cefdf054... Patch: https://github.com/kamailio/kamailio/commit/e1fef0016d6162c4177c0d05cefdf054...
---
diff --git a/src/modules/dmq/bind_dmq.c b/src/modules/dmq/bind_dmq.c index ea38d982503..a0cdaeada20 100644 --- a/src/modules/dmq/bind_dmq.c +++ b/src/modules/dmq/bind_dmq.c @@ -37,5 +37,6 @@ int bind_dmq(dmq_api_t *api) api->send_message = dmq_send_message; api->bcast_message = bcast_dmq_message; api->find_dmq_node_uri = find_dmq_node_uri2; + api->get_dmq_server_socket = get_dmq_server_socket; return 0; } diff --git a/src/modules/dmq/bind_dmq.h b/src/modules/dmq/bind_dmq.h index a946718fa11..f6b7a378d14 100644 --- a/src/modules/dmq/bind_dmq.h +++ b/src/modules/dmq/bind_dmq.h @@ -36,6 +36,7 @@ typedef int (*bcast_message_t)(dmq_peer_t *peer, str *body, dmq_node_t *except, typedef int (*send_message_t)(dmq_peer_t *peer, str *body, dmq_node_t *node, dmq_resp_cback_t *resp_cback, int max_forwards, str *content_type); typedef dmq_node_t *(*find_dmq_node_uri_t)(str *uri); +typedef str (*get_dmq_server_socket_t)();
typedef struct dmq_api { @@ -43,6 +44,7 @@ typedef struct dmq_api bcast_message_t bcast_message; send_message_t send_message; find_dmq_node_uri_t find_dmq_node_uri; + get_dmq_server_socket_t get_dmq_server_socket; } dmq_api_t;
typedef int (*bind_dmq_f)(dmq_api_t *api); diff --git a/src/modules/dmq/dmq_funcs.c b/src/modules/dmq/dmq_funcs.c index a5ba3b4866c..52d0d6bbc18 100644 --- a/src/modules/dmq/dmq_funcs.c +++ b/src/modules/dmq/dmq_funcs.c @@ -566,3 +566,8 @@ void ping_servers(unsigned int ticks, void *param) LM_ERR("error broadcasting message\n"); } } + +str get_dmq_server_socket() +{ + return dmq_server_socket; +} diff --git a/src/modules/dmq/dmq_funcs.h b/src/modules/dmq/dmq_funcs.h index 3f04a860f9f..ba8688d361f 100644 --- a/src/modules/dmq/dmq_funcs.h +++ b/src/modules/dmq/dmq_funcs.h @@ -70,5 +70,6 @@ int ki_dmq_bcast_message( int is_from_remote_node(sip_msg_t *msg); int ki_dmq_t_replicate(struct sip_msg *msg); int ki_dmq_t_replicate_mode(struct sip_msg *msg, int mode); +str get_dmq_server_socket();
#endif