Module: kamailio
Branch: master
Commit: d2e73f9c51630f47fa7660b4c4831fcecd661f87
URL:
https://github.com/kamailio/kamailio/commit/d2e73f9c51630f47fa7660b4c4831fc…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-02-13T12:20:37+01:00
dmq_usrloc: check if socket name is set when replicating
---
Modified: src/modules/dmq_usrloc/usrloc_sync.c
---
Diff:
https://github.com/kamailio/kamailio/commit/d2e73f9c51630f47fa7660b4c4831fc…
Patch:
https://github.com/kamailio/kamailio/commit/d2e73f9c51630f47fa7660b4c4831fc…
---
diff --git a/src/modules/dmq_usrloc/usrloc_sync.c b/src/modules/dmq_usrloc/usrloc_sync.c
index dd2a7f2f42..62477198a2 100644
--- a/src/modules/dmq_usrloc/usrloc_sync.c
+++ b/src/modules/dmq_usrloc/usrloc_sync.c
@@ -692,7 +692,7 @@ int usrloc_dmq_send_multi_contact(ucontact_t* ptr, str aor, int
action, dmq_node
srjson_AddStrToObject(jdoc, jdoc_contact, "sock",
ptr->sock->sock_str.s, ptr->sock->sock_str.len);
jdoc_contact_group.size += ptr->sock->sock_str.len;
}
- else if (_dmq_usrloc_replicate_socket_info==DMQ_USRLOC_REPLICATE_SOCKNAME) {
+ else if (_dmq_usrloc_replicate_socket_info==DMQ_USRLOC_REPLICATE_SOCKNAME &&
ptr->sock!=NULL && ptr->sock->sockname.s!=NULL) {
srjson_AddStrToObject(jdoc, jdoc_contact, "sockname",
ptr->sock->sockname.s, ptr->sock->sockname.len);
jdoc_contact_group.size += ptr->sock->sockname.len;
}