]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 58579 via svnmerge from
authorJoshua Colp <jcolp@digium.com>
Fri, 9 Mar 2007 20:49:47 +0000 (20:49 +0000)
committerJoshua Colp <jcolp@digium.com>
Fri, 9 Mar 2007 20:49:47 +0000 (20:49 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r58579 | file | 2007-03-09 15:46:43 -0500 (Fri, 09 Mar 2007) | 2 lines

If we are unable to lookup the host in a c line we have to abort, otherwise the previous data is gone and we will (potentially) have no data when all is said and done.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@58584 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 2ac487f65e50a7feeebeaad49958e3d11b3f387d..65116bd8d860eb4708e3d22532c2b22a63d13174 100644 (file)
@@ -4856,10 +4856,14 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
                        } else {
                                /* XXX This could block for a long time, and block the main thread! XXX */
                                if (audio) {
-                                       if ( !(hp = ast_gethostbyname(host, &audiohp)))
+                                       if ( !(hp = ast_gethostbyname(host, &audiohp))) {
                                                ast_log(LOG_WARNING, "Unable to lookup RTP Audio host in secondary c= line, '%s'\n", c);
-                               } else if (!(vhp = ast_gethostbyname(host, &videohp)))
+                                               return -2;
+                                       }
+                               } else if (!(vhp = ast_gethostbyname(host, &videohp))) {
                                        ast_log(LOG_WARNING, "Unable to lookup RTP video host in secondary c= line, '%s'\n", c);
+                                       return -2;
+                               }
                        }
 
                }