From: Joshua Colp Date: Sun, 20 Aug 2006 04:49:48 +0000 (+0000) Subject: Turn media level c= parsing on by default (issue #7725 reported by psm) X-Git-Tag: 1.2.11~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=379785c4017811d6d8e8c33f15f554d44020537c;p=thirdparty%2Fasterisk.git Turn media level c= parsing on by default (issue #7725 reported by psm) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@40601 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index b314f161ed..629baeb5b3 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -3589,17 +3589,15 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req) 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 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req) } } /* 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); } } }