[asterisk-commits] dvossel: trunk r279818 - in /trunk: ./ channels/chan_sip.c main/netsock2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 27 11:11:15 CDT 2010


Author: dvossel
Date: Tue Jul 27 11:11:11 2010
New Revision: 279818

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=279818
Log:
Merged revisions 279817 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r279817 | dvossel | 2010-07-27 11:09:15 -0500 (Tue, 27 Jul 2010) | 2 lines
  
  fix sip transaction match with authentication, fix confusing log message when using getaddrinfo
........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_sip.c
    trunk/main/netsock2.c

Propchange: trunk/
------------------------------------------------------------------------------
--- branch-1.8-merged (original)
+++ branch-1.8-merged Tue Jul 27 11:11:11 2010
@@ -1,1 +1,1 @@
-/branches/1.8:1-279056,279113,279227,279273,279280,279314,279390,279410,279442,279472,279502,279504,279562,279566,279568,279598,279601,279619,279636-279815
+/branches/1.8:1-279056,279113,279227,279273,279280,279314,279390,279410,279442,279472,279502,279504,279562,279566,279568,279598,279601,279619,279636-279815,279817

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=279818&r1=279817&r2=279818
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Jul 27 11:11:11 2010
@@ -7369,11 +7369,10 @@
 
 		/* If this is a Request, set the Via and Authorization header arguments */
 		if (req->method != SIP_RESPONSE) {
-			const char *auth_header;
 			args.ruri = REQ_OFFSET_TO_STR(req, rlPart2);
 			get_viabranch(ast_strdupa(get_header(req, "Via")), (char **) &args.viasentby, (char **) &args.viabranch);
-			auth_header = get_header(req, "WWW-Authenticate");
-			if (!ast_strlen_zero(auth_header)) {
+			if (!ast_strlen_zero(get_header(req, "Authorization")) ||
+				!ast_strlen_zero(get_header(req, "Proxy-Authorization"))) {
 				args.authentication_present = 1;
 			}
 		}

Modified: trunk/main/netsock2.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/netsock2.c?view=diff&rev=279818&r1=279817&r2=279818
==============================================================================
--- trunk/main/netsock2.c (original)
+++ trunk/main/netsock2.c Tue Jul 27 11:11:11 2010
@@ -201,8 +201,10 @@
 	hints.ai_flags = AI_NUMERICHOST;
 #endif
 	if ((e = getaddrinfo(host, port, &hints, &res))) {
-		ast_log(LOG_ERROR, "getaddrinfo(\"%s\", \"%s\", ...): %s\n",
-			host, S_OR(port, "(null)"), gai_strerror(e));
+		if (e != EAI_NONAME) { /* if this was just a host name rather than a ip address, don't print error */
+			ast_log(LOG_ERROR, "getaddrinfo(\"%s\", \"%s\", ...): %s\n",
+				host, S_OR(port, "(null)"), gai_strerror(e));
+		}
 		return 0;
 	}
 




More information about the asterisk-commits mailing list