[svn-commits] file: branch 1.4 r89599 - /branches/1.4/res/res_features.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Nov 26 12:02:57 CST 2007


Author: file
Date: Mon Nov 26 12:02:56 2007
New Revision: 89599

URL: http://svn.digium.com/view/asterisk?view=rev&rev=89599
Log:
Add module counting removal for error conditions.
(closes issue #11333)
Reported by: Laureano
Patches:
      res_features_v2.c.patch uploaded by Laureano (license 265)

Modified:
    branches/1.4/res/res_features.c

Modified: branches/1.4/res/res_features.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/res/res_features.c?view=diff&rev=89599&r1=89598&r2=89599
==============================================================================
--- branches/1.4/res/res_features.c (original)
+++ branches/1.4/res/res_features.c Mon Nov 26 12:02:56 2007
@@ -1921,6 +1921,7 @@
 			if (error) {
 				ast_log(LOG_WARNING, "Failed to play courtesy tone!\n");
 				ast_hangup(peer);
+				ast_module_user_remove(u);
 				return -1;
 			}
 		} else
@@ -1930,6 +1931,7 @@
 		if (res < 0) {
 			ast_log(LOG_WARNING, "Could not make channels %s and %s compatible for bridge\n", chan->name, peer->name);
 			ast_hangup(peer);
+			ast_module_user_remove(u);
 			return -1;
 		}
 		/* This runs sorta backwards, since we give the incoming channel control, as if it
@@ -1950,6 +1952,7 @@
 		/* Simulate the PBX hanging up */
 		if (res != AST_PBX_NO_HANGUP_PEER)
 			ast_hangup(peer);
+		ast_module_user_remove(u);
 		return res;
 	} else {
 		/*! \todo XXX Play a message XXX */




More information about the svn-commits mailing list