handle no-peer-specified-in-dial-string gracefully (issue #5132)
authorKevin P. Fleming <kpfleming@digium.com>
Wed, 7 Sep 2005 20:52:03 +0000 (20:52 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Wed, 7 Sep 2005 20:52:03 +0000 (20:52 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6537 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index 9c1c5f4..ddc0102 100755 (executable)
@@ -7713,6 +7713,12 @@ static struct ast_channel *iax2_request(const char *type, int format, void *data
 
        ast_copy_flags(&cai, &globalflags, IAX_NOTRANSFER | IAX_USEJITTERBUF | IAX_FORCEJITTERBUF);
 
+       if (!pds.peer) {
+               ast_log(LOG_WARNING, "No peer given\n");
+               return NULL;
+       }
+              
+       
        /* Populate our address from the given */
        if (create_addr(pds.peer, &sin, &cai)) {
                *cause = AST_CAUSE_UNREGISTERED;