Module: kamailio
Branch: master
Commit: f97149aec9da71085df9dcf4541abba7b756939c
URL:
https://github.com/kamailio/kamailio/commit/f97149aec9da71085df9dcf4541abba…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-10-25T18:31:21+02:00
dmq_usrloc: avoid needless second local socket search
- remove overwriting local socket string value with received item
---
Modified: src/modules/dmq_usrloc/usrloc_sync.c
---
Diff:
https://github.com/kamailio/kamailio/commit/f97149aec9da71085df9dcf4541abba…
Patch:
https://github.com/kamailio/kamailio/commit/f97149aec9da71085df9dcf4541abba…
---
diff --git a/src/modules/dmq_usrloc/usrloc_sync.c b/src/modules/dmq_usrloc/usrloc_sync.c
index 61342cca2fe..8cbf63731c2 100644
--- a/src/modules/dmq_usrloc/usrloc_sync.c
+++ b/src/modules/dmq_usrloc/usrloc_sync.c
@@ -373,10 +373,6 @@ static int usrloc_dmq_execute_action(srjson_t *jdoc_action,
dmq_node_t *node)
sock = grep_sock_info(&host, (unsigned short)port, proto);
if(sock == 0) {
LM_DBG("non-local socket <%s>...ignoring\n", it->valuestring);
- } else {
- sock = grep_sock_info(&host, (unsigned short)port, proto);
- sock->sock_str.s = it->valuestring;
- sock->sock_str.len = strlen(sock->sock_str.s);
}
} else if(_dmq_usrloc_replicate_socket_info
== DMQ_USRLOC_REPLICATE_SOCKNAME