[asterisk-commits] crichter: branch 1.2 r42110 - /branches/1.2/channels/chan_misdn.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Sep 6 10:10:41 MST 2006


Author: crichter
Date: Wed Sep  6 12:10:41 2006
New Revision: 42110

URL: http://svn.digium.com/view/asterisk?rev=42110&view=rev
Log:
fixed pipe consuming bug when using chanIsAvail (#7878), also moved a debug log to the very begining of misdn_hangup.

Modified:
    branches/1.2/channels/chan_misdn.c

Modified: branches/1.2/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_misdn.c?rev=42110&r1=42109&r2=42110&view=diff
==============================================================================
--- branches/1.2/channels/chan_misdn.c (original)
+++ branches/1.2/channels/chan_misdn.c Wed Sep  6 12:10:41 2006
@@ -1952,9 +1952,9 @@
 	struct chan_list *p;
 	struct misdn_bchannel *bc=NULL;
 	
+	ast_log(LOG_DEBUG, "misdn_hangup(%s)\n", ast->name);
+
 	if (!ast || ! (p=MISDN_ASTERISK_TECH_PVT(ast) ) ) return -1;
-	
-	ast_log(LOG_DEBUG, "misdn_hangup(%s)\n", ast->name);
 	
 	if (!p) {
 		chan_misdn_log(3, 0, "misdn_hangup called, without chan_list obj.\n");
@@ -1976,11 +1976,15 @@
 	
 	if (ast->_state == AST_STATE_RESERVED) {
 		/* between request and call */
+		ast_log(LOG_DEBUG, "State Reserved => chanIsAvail\n");
 		MISDN_ASTERISK_TECH_PVT(ast)=NULL;
 		
 		cl_dequeue_chan(&cl_te, p);
+		
+		close(p->pipe[0]);
+		close(p->pipe[1]);
+		
 		free(p);
-		
 		if (bc)
 			misdn_lib_release(bc);
 		



More information about the asterisk-commits mailing list