Merged revisions 77993 via svnmerge from
authorJason Parker <jparker@digium.com>
Thu, 2 Aug 2007 20:23:20 +0000 (20:23 +0000)
committerJason Parker <jparker@digium.com>
Thu, 2 Aug 2007 20:23:20 +0000 (20:23 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #10325)
........
r77993 | qwell | 2007-08-02 15:22:40 -0500 (Thu, 02 Aug 2007) | 5 lines

If a device disconnects, the session will go away.
If this happens during call setup, we need to give up.

Issue 10325.

........

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

channels/chan_skinny.c

index 78d6cb4..6a693df 100644 (file)
@@ -2935,6 +2935,11 @@ static int skinny_indicate(struct ast_channel *ast, int ind, const void *data, s
        struct skinnysession *s = d->session;
        char exten[AST_MAX_EXTENSION] = "";
 
+       if (!s) {
+               ast_log(LOG_NOTICE, "Asked to indicate '%s' condition on channel %s, but session does not exist.\n", control2str(ind), ast->name);
+               return -1;
+       }
+
        ast_copy_string(exten, S_OR(ast->macroexten, ast->exten), sizeof(exten));
 
        if (skinnydebug)