Module: kamailio Branch: master Commit: 1b1a7816a86788daf9c9dc2bc8f61bbd4aab8b3d URL: https://github.com/kamailio/kamailio/commit/1b1a7816a86788daf9c9dc2bc8f61bbd...
Author: Federico Favaro federico@aereo.lan.athonet.com Committer: Federico Favaro federico@aereo.lan.athonet.com Date: 2016-07-01T17:05:11+02:00
cdp: Review log level on peer_connect() function
In order to log as ERROR if something wrong occurs
---
Modified: modules/cdp/receiver.c
---
Diff: https://github.com/kamailio/kamailio/commit/1b1a7816a86788daf9c9dc2bc8f61bbd... Patch: https://github.com/kamailio/kamailio/commit/1b1a7816a86788daf9c9dc2bc8f61bbd...
---
diff --git a/modules/cdp/receiver.c b/modules/cdp/receiver.c index fa6af0b..ee406f5 100644 --- a/modules/cdp/receiver.c +++ b/modules/cdp/receiver.c @@ -857,7 +857,7 @@ int peer_connect(peer *p) { if (getnameinfo(ainfo->ai_addr,ainfo->ai_addrlen, host,256,serv,256,NI_NUMERICHOST|NI_NUMERICSERV)==0){ - LM_WARN("peer_connect(): Trying to connect to %s port %s\n", + LM_INFO("peer_connect(): Trying to connect to %s port %s\n", host,serv); }
@@ -876,11 +876,11 @@ int peer_connect(peer *p) error = getaddrinfo(p->src_addr.s, NULL, &hints, &sainfo);
if (error!=0){ - LM_WARN("peer_connect(): error getting client socket on %.*s:%s\n", + LM_ERR("peer_connect(): error getting client socket on %.*s:%s\n", p->src_addr.len,p->src_addr.s,gai_strerror(error)); } else { if (bind(sock, sainfo->ai_addr, sainfo->ai_addrlen )) { - LM_WARN("peer_connect(): error opening client socket on %.*s:%s\n", + LM_ERR("peer_connect(): error opening client socket on %.*s:%s\n", p->src_addr.len,p->src_addr.s,strerror(errno)); } } @@ -905,18 +905,18 @@ int peer_connect(peer *p) int valopt; getsockopt(sock, SOL_SOCKET, SO_ERROR, (void*)(&valopt), &lon); if (valopt) { - LM_WARN("peer_connect(): Error opening connection to to %s port %s >%s\n",host,serv,strerror(valopt)); + LM_ERR("peer_connect(): Error opening connection to to %s port %s >%s\n",host,serv,strerror(valopt)); close(sock); continue; } }else{ - LM_WARN("peer_connect(): Timeout or error opening connection to to %s port %s >%s\n",host,serv,strerror(errno)); + LM_ERR("peer_connect(): Timeout or error opening connection to to %s port %s >%s\n",host,serv,strerror(errno)); close(sock); continue; } } }else{ - LM_WARN("peer_connect(): Error opening connection to to %s port %s >%s\n",host,serv,strerror(errno)); + LM_ERR("peer_connect(): Error opening connection to to %s port %s >%s\n",host,serv,strerror(errno)); close(sock); continue; }