[svn-commits] mnicholson: branch irroot/t38gateway-trunk r324486 - /team/irroot/t38gateway-...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jun 22 14:12:10 CDT 2011


Author: mnicholson
Date: Wed Jun 22 14:12:07 2011
New Revision: 324486

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=324486
Log:
update the fax registry when the gateway is destroyed instead of when it is
detached from a channel. These events should occur roughly at the same time
either way.

Modified:
    team/irroot/t38gateway-trunk/res/res_fax.c

Modified: team/irroot/t38gateway-trunk/res/res_fax.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-trunk/res/res_fax.c?view=diff&rev=324486&r1=324485&r2=324486
==============================================================================
--- team/irroot/t38gateway-trunk/res/res_fax.c (original)
+++ team/irroot/t38gateway-trunk/res/res_fax.c Wed Jun 22 14:12:07 2011
@@ -2328,6 +2328,11 @@
 	if (gateway->s) {
 		fax_session_release(gateway->s, gateway->token);
 		gateway->s->details->caps |= ~AST_FAX_TECH_GATEWAY;
+
+		ao2_lock(faxregistry.container);
+		ao2_unlink(faxregistry.container, gateway->s);
+		ao2_unlock(faxregistry.container);
+
 		ao2_ref(gateway->s, -1);
 		gateway->s = NULL;
 		gateway->token = NULL;
@@ -2655,9 +2660,6 @@
 		if (gateway->s->tech->cancel_session) {
 			gateway->s->tech->cancel_session(gateway->s);
 		}
-		ao2_lock(faxregistry.container);
-		ao2_unlink(faxregistry.container, gateway->s);
-		ao2_unlock(faxregistry.container);
 	}
 
 	ao2_ref(gateway, -1);




More information about the svn-commits mailing list