Skip to content

Commit

Permalink
dmq: force to send replicated messages from configured server address…
Browse files Browse the repository at this point in the history
… - as reported on list by Victor Kustov
  • Loading branch information
charlesrchance committed Nov 13, 2014
1 parent 7210646 commit 7b5f79f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/dmq/dmq_funcs.c
Expand Up @@ -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
Expand All @@ -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) {
Expand Down

0 comments on commit 7b5f79f

Please sign in to comment.