]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
fix crash when using the ParkAndAnnounce application. When using this application,
authorRussell Bryant <russell@russellbryant.com>
Tue, 21 Mar 2006 18:21:47 +0000 (18:21 +0000)
committerRussell Bryant <russell@russellbryant.com>
Tue, 21 Mar 2006 18:21:47 +0000 (18:21 +0000)
there will be no peer channel to play the parking announcement to. (issue #6756)

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

res/res_features.c

index bf23129ae41cfd4d37ad781cc59de792cc409289..bf248b5f44f9cfe5b5025e4bb82f47ad5ab79a3e 100644 (file)
@@ -362,7 +362,7 @@ int ast_park_call(struct ast_channel *chan, struct ast_channel *peer, int timeou
                "Timeout: %ld\r\n"
                "CallerID: %s\r\n"
                "CallerIDName: %s\r\n"
-               ,pu->parkingnum, pu->chan->name, peer->name
+               ,pu->parkingnum, pu->chan->name, peer ? peer->name : ""
                ,(long)pu->start.tv_sec + (long)(pu->parkingtime/1000) - (long)time(NULL)
                ,(pu->chan->cid.cid_num ? pu->chan->cid.cid_num : "<unknown>")
                ,(pu->chan->cid.cid_name ? pu->chan->cid.cid_name : "<unknown>")