[asterisk-commits] dvossel: branch dvossel/iax2transfer_1.6.0 r173243 - /team/dvossel/iax2transf...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Feb 3 16:39:59 CST 2009


Author: dvossel
Date: Tue Feb  3 16:39:58 2009
New Revision: 173243

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=173243
Log:
fixed loading error checking for iax transfer hash table

Modified:
    team/dvossel/iax2transfer_1.6.0/channels/chan_iax2.c

Modified: team/dvossel/iax2transfer_1.6.0/channels/chan_iax2.c
URL: http://svn.digium.com/svn-view/asterisk/team/dvossel/iax2transfer_1.6.0/channels/chan_iax2.c?view=diff&rev=173243&r1=173242&r2=173243
==============================================================================
--- team/dvossel/iax2transfer_1.6.0/channels/chan_iax2.c (original)
+++ team/dvossel/iax2transfer_1.6.0/channels/chan_iax2.c Tue Feb  3 16:39:58 2009
@@ -2347,7 +2347,7 @@
 			remove_by_peercallno(pvt);
 		}
 
-		if(pvt->transfercallno) {
+		if (pvt->transfercallno) {
 			remove_by_transfercallno(pvt);
 		}
 
@@ -12255,13 +12255,18 @@
 		return AST_MODULE_LOAD_FAILURE;
 	}
 	iax_peercallno_pvts = ao2_container_alloc(IAX_MAX_CALLS, pvt_hash_cb, pvt_cmp_cb);
-	iax_transfercallno_pvts = ao2_container_alloc(IAX_MAX_CALLS, transfercallno_pvt_hash_cb, transfercallno_pvt_cmp_cb);
 	if (!iax_peercallno_pvts) {
 		ao2_ref(peers, -1);
 		ao2_ref(users, -1);
 		return AST_MODULE_LOAD_FAILURE;
 	}
-
+	iax_transfercallno_pvts = ao2_container_alloc(IAX_MAX_CALLS, transfercallno_pvt_hash_cb, transfercallno_pvt_cmp_cb);
+	if (!iax_transfercallno_pvts) {
+		ao2_ref(peers, -1);
+		ao2_ref(users, -1);
+		ao2_ref(iax_peercallno_pvts, -1);
+		return AST_MODULE_LOAD_FAILURE;
+	}
 	ast_custom_function_register(&iaxpeer_function);
 	ast_custom_function_register(&iaxvar_function);
 




More information about the asterisk-commits mailing list