]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge Script <automerge@asterisk.org>
Thu, 26 Apr 2007 00:18:36 +0000 (00:18 +0000)
committerAutomerge Script <automerge@asterisk.org>
Thu, 26 Apr 2007 00:18:36 +0000 (00:18 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@61957 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c

index 755e80661bd0134006375c7433756af776ead09d..e67a73cc21e013bce4d9feb39a997bbd226b965d 100644 (file)
@@ -5389,6 +5389,16 @@ static void *ss_thread(void *data)
        int len = 0;
        int res;
        int index;
+
+       /* in the bizarre case where the channel has become a zombie before we
+          even get started here, abort safely
+       */
+       if (!p) {
+               ast_log(LOG_WARNING, "Channel became a zombie before simple switch could be started (%s)\n", chan->name);
+               ast_hangup(chan);
+               return NULL;
+       }
+
        if (option_verbose > 2) 
                ast_verbose( VERBOSE_PREFIX_3 "Starting simple switch on '%s'\n", chan->name);
        index = zt_get_index(chan, p, 1);