[asterisk-commits] file: branch 1.2 r40601 - /branches/1.2/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sat Aug 19 21:49:49 MST 2006


Author: file
Date: Sat Aug 19 23:49:48 2006
New Revision: 40601

URL: http://svn.digium.com/view/asterisk?rev=40601&view=rev
Log:
Turn media level c= parsing on by default (issue #7725 reported by psm)

Modified:
    branches/1.2/channels/chan_sip.c

Modified: branches/1.2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_sip.c?rev=40601&r1=40600&r2=40601&view=diff
==============================================================================
--- branches/1.2/channels/chan_sip.c (original)
+++ branches/1.2/channels/chan_sip.c Sat Aug 19 23:49:48 2006
@@ -3589,17 +3589,15 @@
 		return -2;
 	}
 	/* Check for Media-description-level-address for audio */
-	if (pedanticsipchecking) {
-		c = get_sdp_iterate(&destiterator, req, "c");
-		if (!ast_strlen_zero(c)) {
-			if (sscanf(c, "IN IP4 %256s", host) != 1) {
-				ast_log(LOG_WARNING, "Invalid secondary host in c= line, '%s'\n", c);
-			} else {
-				/* XXX This could block for a long time, and block the main thread! XXX */
-				hp = ast_gethostbyname(host, &ahp);
-				if (!hp) {
-					ast_log(LOG_WARNING, "Unable to lookup host in secondary c= line, '%s'\n", c);
-				}
+	c = get_sdp_iterate(&destiterator, req, "c");
+	if (!ast_strlen_zero(c)) {
+		if (sscanf(c, "IN IP4 %256s", host) != 1) {
+			ast_log(LOG_WARNING, "Invalid secondary host in c= line, '%s'\n", c);
+		} else {
+			/* XXX This could block for a long time, and block the main thread! XXX */
+			hp = ast_gethostbyname(host, &ahp);
+			if (!hp) {
+				ast_log(LOG_WARNING, "Unable to lookup host in secondary c= line, '%s'\n", c);
 			}
 		}
 	}
@@ -3617,17 +3615,15 @@
 		}
 	}
 	/* Check for Media-description-level-address for video */
-	if (pedanticsipchecking) {
-		c = get_sdp_iterate(&destiterator, req, "c");
-		if (!ast_strlen_zero(c)) {
-			if (sscanf(c, "IN IP4 %256s", host) != 1) {
-				ast_log(LOG_WARNING, "Invalid secondary host in c= line, '%s'\n", c);
-			} else {
-				/* XXX This could block for a long time, and block the main thread! XXX */
-				hp = ast_gethostbyname(host, &ahp);
-				if (!hp) {
-					ast_log(LOG_WARNING, "Unable to lookup host in secondary c= line, '%s'\n", c);
-				}
+	c = get_sdp_iterate(&destiterator, req, "c");
+	if (!ast_strlen_zero(c)) {
+		if (sscanf(c, "IN IP4 %256s", host) != 1) {
+			ast_log(LOG_WARNING, "Invalid secondary host in c= line, '%s'\n", c);
+		} else {
+			/* XXX This could block for a long time, and block the main thread! XXX */
+			hp = ast_gethostbyname(host, &ahp);
+			if (!hp) {
+				ast_log(LOG_WARNING, "Unable to lookup host in secondary c= line, '%s'\n", c);
 			}
 		}
 	}



More information about the asterisk-commits mailing list