From eb63c3eece5693c968c7510766c9ee8bd7493c2b Mon Sep 17 00:00:00 2001 From: Jason Parker Date: Thu, 2 Aug 2007 20:22:40 +0000 Subject: [PATCH] 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/branches/1.4@77993 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_skinny.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index a070d6a590..64c306f274 100644 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -2727,6 +2727,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)