From: Christian Richter Date: Wed, 6 Sep 2006 18:02:25 +0000 (+0000) Subject: fixed pipe consuming bug when using chanIsAvail (#7878), also moved a debug log to... X-Git-Tag: 1.4.0-beta1~171 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b1fca65c77e2c9d6cd0331cf7ccb7a441293b939;p=thirdparty%2Fasterisk.git fixed pipe consuming bug when using chanIsAvail (#7878), also moved a debug log to the very begining of misdn_hangup. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42126 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c index 6815056f2f..66c459b355 100644 --- a/channels/chan_misdn.c +++ b/channels/chan_misdn.c @@ -2225,10 +2225,10 @@ static int misdn_hangup(struct ast_channel *ast) struct chan_list *p; struct misdn_bchannel *bc=NULL; - if (!ast || ! (p=MISDN_ASTERISK_TECH_PVT(ast) ) ) return -1; - ast_log(LOG_DEBUG, "misdn_hangup(%s)\n", ast->name); + if (!ast || ! (p=MISDN_ASTERISK_TECH_PVT(ast) ) ) return -1; + if (!p) { chan_misdn_log(3, 0, "misdn_hangup called, without chan_list obj.\n"); return 0 ; @@ -2252,6 +2252,8 @@ static int misdn_hangup(struct ast_channel *ast) MISDN_ASTERISK_TECH_PVT(ast)=NULL; cl_dequeue_chan(&cl_te, p); + close(p->pipe[0]); + close(p->pipe[1]); free(p); if (bc)