[svn-commits] tilghman: trunk r282827 - in /trunk: ./ main/netsock2.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Aug 19 09:46:11 CDT 2010
Author: tilghman
Date: Thu Aug 19 09:46:08 2010
New Revision: 282827
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=282827
Log:
Merged revisions 282826 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r282826 | tilghman | 2010-08-19 09:44:51 -0500 (Thu, 19 Aug 2010) | 2 lines
Only output debugging if the debug level is on.
........
Modified:
trunk/ (props changed)
trunk/main/netsock2.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: trunk/main/netsock2.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/netsock2.c?view=diff&rev=282827&r1=282826&r2=282827
==============================================================================
--- trunk/main/netsock2.c (original)
+++ trunk/main/netsock2.c Thu Aug 19 09:46:08 2010
@@ -343,7 +343,9 @@
addr->len == sizeof(struct sockaddr_in6)) {
return ntohs(((struct sockaddr_in6 *)&addr->ss)->sin6_port);
}
- ast_log(__LOG_DEBUG, file, line, func, "Not an IPv4 nor IPv6 address, cannot get port.\n");
+ if (option_debug >= 1) {
+ ast_log(__LOG_DEBUG, file, line, func, "Not an IPv4 nor IPv6 address, cannot get port.\n");
+ }
return 0;
}
@@ -355,7 +357,7 @@
} else if (addr->ss.ss_family == AF_INET6 &&
addr->len == sizeof(struct sockaddr_in6)) {
((struct sockaddr_in6 *)&addr->ss)->sin6_port = htons(port);
- } else {
+ } else if (option_debug >= 1) {
ast_log(__LOG_DEBUG, file, line, func,
"Not an IPv4 nor IPv6 address, cannot set port.\n");
}
@@ -485,7 +487,7 @@
return 0;
}
- if (addr->ss.ss_family != AF_INET) {
+ if (addr->ss.ss_family != AF_INET && option_debug >= 1) {
ast_log(__LOG_DEBUG, file, line, func, "Address family is not AF_INET\n");
}
@@ -498,7 +500,7 @@
{
memcpy(&addr->ss, sin, sizeof(*sin));
- if (addr->ss.ss_family != AF_INET) {
+ if (addr->ss.ss_family != AF_INET && option_debug >= 1) {
ast_log(__LOG_DEBUG, file, line, func, "Address family is not AF_INET\n");
}
More information about the svn-commits
mailing list