mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-18 18:58:22 +00:00
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/branches/1.2@42110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1952,9 +1952,9 @@ static int misdn_hangup(struct ast_channel *ast)
|
|||||||
struct chan_list *p;
|
struct chan_list *p;
|
||||||
struct misdn_bchannel *bc=NULL;
|
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);
|
ast_log(LOG_DEBUG, "misdn_hangup(%s)\n", ast->name);
|
||||||
|
|
||||||
|
if (!ast || ! (p=MISDN_ASTERISK_TECH_PVT(ast) ) ) return -1;
|
||||||
|
|
||||||
if (!p) {
|
if (!p) {
|
||||||
chan_misdn_log(3, 0, "misdn_hangup called, without chan_list obj.\n");
|
chan_misdn_log(3, 0, "misdn_hangup called, without chan_list obj.\n");
|
||||||
@@ -1976,11 +1976,15 @@ static int misdn_hangup(struct ast_channel *ast)
|
|||||||
|
|
||||||
if (ast->_state == AST_STATE_RESERVED) {
|
if (ast->_state == AST_STATE_RESERVED) {
|
||||||
/* between request and call */
|
/* between request and call */
|
||||||
|
ast_log(LOG_DEBUG, "State Reserved => chanIsAvail\n");
|
||||||
MISDN_ASTERISK_TECH_PVT(ast)=NULL;
|
MISDN_ASTERISK_TECH_PVT(ast)=NULL;
|
||||||
|
|
||||||
cl_dequeue_chan(&cl_te, p);
|
cl_dequeue_chan(&cl_te, p);
|
||||||
free(p);
|
|
||||||
|
|
||||||
|
close(p->pipe[0]);
|
||||||
|
close(p->pipe[1]);
|
||||||
|
|
||||||
|
free(p);
|
||||||
if (bc)
|
if (bc)
|
||||||
misdn_lib_release(bc);
|
misdn_lib_release(bc);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user