Module: kamailio
Branch: 4.2
Commit: 120bf4a4f6854592bd910334d4d0bd97c9f94974
URL:
https://github.com/kamailio/kamailio/commit/120bf4a4f6854592bd910334d4d0bd9…
Author: Charles Chance <charles.chance(a)sipcentric.com>
Committer: Charles Chance <charles.chance(a)sipcentric.com>
Date: 2015-01-09T15:55:20Z
dmq: force to send replicated messages from configured server address - as reported on
list by Victor Kustov
(cherry picked from commit 7b5f79f9f384bfe3c16c399184281ebe63bb7785)
---
Modified: modules/dmq/dmq_funcs.c
---
Diff:
https://github.com/kamailio/kamailio/commit/120bf4a4f6854592bd910334d4d0bd9…
Patch:
https://github.com/kamailio/kamailio/commit/120bf4a4f6854592bd910334d4d0bd9…
---
diff --git a/modules/dmq/dmq_funcs.c b/modules/dmq/dmq_funcs.c
index 4b323c2..7430193 100644
--- a/modules/dmq/dmq_funcs.c
+++ b/modules/dmq/dmq_funcs.c
@@ -383,6 +383,7 @@ int cfg_dmq_bcast_message(struct sip_msg* msg, char* peer, char* body,
char* con
int cfg_dmq_t_replicate(struct sip_msg* msg, char* s)
{
dmq_node_t* node;
+ struct socket_info* sock;
int i = 0;
/* avoid loops - do not replicate if message has come from another node
@@ -394,6 +395,12 @@ int cfg_dmq_t_replicate(struct sip_msg* msg, char* s)
return -1;
}
+ /* TODO - backup/restore original send socket */
+ sock = lookup_local_socket(&dmq_server_socket);
+ if (sock) {
+ set_force_socket(msg, sock);
+ }
+
lock_get(&node_list->lock);
node = node_list->nodes;
while(node) {