]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
When doing some tests, I was having a crash at the end of every call
authorMark Michelson <mmichelson@digium.com>
Wed, 12 Nov 2008 17:38:33 +0000 (17:38 +0000)
committerMark Michelson <mmichelson@digium.com>
Wed, 12 Nov 2008 17:38:33 +0000 (17:38 +0000)
if an attended transfer occurred during the call. I traced the cause to
the CDR on one of the channels being NULL. murf suggested a check in
the end bridge callback to be sure the CDR is non-NULL before proceeding,
so that's what I'm adding.

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

apps/app_dial.c

index 72ad5a6c4805d9022cd0ef60363cf2dfacebf810..0032dd845c14d33c5048eaf713d0321361a23257 100644 (file)
@@ -838,6 +838,10 @@ static void end_bridge_callback (void *data)
        time_t end;
        struct ast_channel *chan = data;
 
+       if (!chan->cdr) {
+               return;
+       }
+
        time(&end);
 
        ast_channel_lock(chan);