[asterisk-commits] russell: branch russell/iax2_find_callno r114863 - /team/russell/iax2_find_ca...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Apr 29 16:59:09 CDT 2008


Author: russell
Date: Tue Apr 29 16:59:08 2008
New Revision: 114863

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114863
Log:
Fix bugs.  This now "works", but the performance is surprisingly terrible,
will investigate more shortly.

Modified:
    team/russell/iax2_find_callno/channels/chan_iax2.c

Modified: team/russell/iax2_find_callno/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/russell/iax2_find_callno/channels/chan_iax2.c?view=diff&rev=114863&r1=114862&r2=114863
==============================================================================
--- team/russell/iax2_find_callno/channels/chan_iax2.c (original)
+++ team/russell/iax2_find_callno/channels/chan_iax2.c Tue Apr 29 16:59:08 2008
@@ -1410,7 +1410,6 @@
 
 		jb_destroy(pvt->jb);
 		ast_string_field_free_memory(pvt);
-		ast_free(pvt);
 	}
 }
 
@@ -1424,7 +1423,7 @@
 	}
 
 	if (ast_string_field_init(tmp, 32)) {
-		ast_free(tmp);
+		ao2_ref(tmp, -1);
 		tmp = NULL;
 		return NULL;
 	}
@@ -2246,13 +2245,15 @@
 			/* It is ok to use ast_queue_hangup() here instead of iax2_queue_hangup()
 			 * because we already hold the owner channel lock. */
 			ast_queue_hangup(owner, -1);
-
+		}
+
+		if (pvt->peercallno) {
+			remove_by_peercallno(pvt);
+		}
+
+		if (!owner) {
 			ao2_ref(pvt, -1);
 			pvt = NULL;
-		}
-
-		if (pvt && pvt->peercallno) {
-			remove_by_peercallno(pvt);
 		}
 	}
 




More information about the asterisk-commits mailing list