From: Mark Spencer Date: Sat, 11 Sep 2004 13:37:36 +0000 (+0000) Subject: Don't set guardtime if channel is only reserved (bug #2421) X-Git-Tag: 1.0.0~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e31d4ee7776a06fa4e0a195b370163e6d8e55e0a;p=thirdparty%2Fasterisk.git Don't set guardtime if channel is only reserved (bug #2421) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3764 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 8421ea02ac..e8b510d873 100755 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -2158,9 +2158,12 @@ static int zt_hangup(struct ast_channel *ast) case SIG_FXSGS: case SIG_FXSLS: case SIG_FXSKS: - /* Make sure we're not made available for at least two seconds */ - time(&p->guardtime); - p->guardtime += 2; + /* Make sure we're not made available for at least two seconds assuming + we were actually used for an inbound or outbound call. */ + if (ast->_state != AST_STATE_RESERVED) { + time(&p->guardtime); + p->guardtime += 2; + } break; default: tone_zone_play_tone(p->subs[SUB_REAL].zfd, -1);