Module: kamailio
Branch: master
Commit: d39f12ced4c79f3b7d60b5477f5065d9589547e8
URL:
https://github.com/kamailio/kamailio/commit/d39f12ced4c79f3b7d60b5477f5065d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-10-10T11:46:14+02:00
cdp: use empty string for debug messages when value is not set
---
Modified: src/modules/cdp/receiver.c
---
Diff:
https://github.com/kamailio/kamailio/commit/d39f12ced4c79f3b7d60b5477f5065d…
Patch:
https://github.com/kamailio/kamailio/commit/d39f12ced4c79f3b7d60b5477f5065d…
---
diff --git a/src/modules/cdp/receiver.c b/src/modules/cdp/receiver.c
index 692cc363ae2..333b22c5c1c 100644
--- a/src/modules/cdp/receiver.c
+++ b/src/modules/cdp/receiver.c
@@ -709,7 +709,7 @@ int receive_loop(peer *original_peer)
LM_DBG("select_recv(): fd exchange pipe says fd [%d] for peer
%p:[%.*s]\n",fd,
p,
p?p->fqdn.len:0,
- p?p->fqdn.s:0);
+ p?p->fqdn.s:"");
if (p){
sp2=0;
for(sp=serviced_peers;sp;sp=sp->next)
@@ -748,7 +748,7 @@ int receive_loop(peer *original_peer)
if (sp->tcp_socket>=0 && FD_ISSET(sp->tcp_socket,&efds)) {
LM_INFO("select_recv(): [%.*s] Peer socket [%d] found on the exception
list... dropping\n",
sp->p?sp->p->fqdn.len:0,
- sp->p?sp->p->fqdn.s:0,
+ sp->p?sp->p->fqdn.s:"",
sp->tcp_socket);
goto drop_peer;
}
@@ -776,7 +776,7 @@ int receive_loop(peer *original_peer)
continue;
LM_ERR("select_recv(): [%.*s] write on socket [%d] returned error> %s...
dropping\n",
sp->p?sp->p->fqdn.len:0,
- sp->p?sp->p->fqdn.s:0,
+ sp->p?sp->p->fqdn.s:"",
sp->tcp_socket,
strerror(errno));
AAAFreeMessage(&msg);
@@ -787,7 +787,7 @@ int receive_loop(peer *original_peer)
if (cnt!=msg->buf.len){
LM_ERR("select_recv(): [%.*s] write on socket [%d] only wrote %d/%d
bytes... dropping\n",
sp->p?sp->p->fqdn.len:0,
- sp->p?sp->p->fqdn.s:0,
+ sp->p?sp->p->fqdn.s:"",
sp->tcp_socket,
cnt,
msg->buf.len);
@@ -807,7 +807,7 @@ int receive_loop(peer *original_peer)
if (cnt<=0) {
LM_INFO("select_recv(): [%.*s] read on socket [%d] returned %d > %s...
dropping\n",
sp->p?sp->p->fqdn.len:0,
- sp->p?sp->p->fqdn.s:0,
+ sp->p?sp->p->fqdn.s:"",
sp->tcp_socket,
cnt,
errno?strerror(errno):"");