[asterisk-commits] russell: branch russell/ast_channel_ao2 r174147 - in /team/russell/ast_channe...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Feb 7 10:04:30 CST 2009


Author: russell
Date: Sat Feb  7 10:04:30 2009
New Revision: 174147

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=174147
Log:
Remove some more uses of ast_channel_free()

Modified:
    team/russell/ast_channel_ao2/channels/chan_gtalk.c
    team/russell/ast_channel_ao2/funcs/func_odbc.c

Modified: team/russell/ast_channel_ao2/channels/chan_gtalk.c
URL: http://svn.digium.com/svn-view/asterisk/team/russell/ast_channel_ao2/channels/chan_gtalk.c?view=diff&rev=174147&r1=174146&r2=174147
==============================================================================
--- team/russell/ast_channel_ao2/channels/chan_gtalk.c (original)
+++ team/russell/ast_channel_ao2/channels/chan_gtalk.c Sat Feb  7 10:04:30 2009
@@ -1189,7 +1189,7 @@
 		gtalk_action(client, p, "reject");
 		p->alreadygone = 1;
 		gtalk_hangup(chan);
-		ast_channel_free(chan);
+		ast_channel_release(chan);
 		return -1;
 	}	
 

Modified: team/russell/ast_channel_ao2/funcs/func_odbc.c
URL: http://svn.digium.com/svn-view/asterisk/team/russell/ast_channel_ao2/funcs/func_odbc.c?view=diff&rev=174147&r1=174146&r2=174147
==============================================================================
--- team/russell/ast_channel_ao2/funcs/func_odbc.c (original)
+++ team/russell/ast_channel_ao2/funcs/func_odbc.c Sat Feb  7 10:04:30 2009
@@ -255,7 +255,7 @@
 		if (chan)
 			ast_autoservice_stop(chan);
 		if (bogus_chan) {
-			ast_channel_free(chan);
+			ast_channel_release(chan);
 		} else {
 			pbx_builtin_setvar_helper(chan, "ODBCSTATUS", status);
 		}
@@ -344,7 +344,7 @@
 	if (chan)
 		ast_autoservice_stop(chan);
 	if (bogus_chan)
-		ast_channel_free(chan);
+		ast_channel_release(chan);
 
 	return 0;
 }
@@ -449,7 +449,7 @@
 			ast_autoservice_stop(chan);
 		}
 		if (bogus_chan) {
-			ast_channel_free(chan);
+			ast_channel_release(chan);
 		}
 		return -1;
 	}
@@ -465,7 +465,7 @@
 			ast_autoservice_stop(chan);
 		}
 		if (bogus_chan) {
-			ast_channel_free(chan);
+			ast_channel_release(chan);
 		}
 		return -1;
 	}
@@ -491,7 +491,7 @@
 		if (chan)
 			ast_autoservice_stop(chan);
 		if (bogus_chan)
-			ast_channel_free(chan);
+			ast_channel_release(chan);
 		return res1;
 	}
 
@@ -533,7 +533,7 @@
 						if (chan)
 							ast_autoservice_stop(chan);
 						if (bogus_chan)
-							ast_channel_free(chan);
+							ast_channel_release(chan);
 						return -1;
 					}
 					resultset = tmp;
@@ -628,7 +628,7 @@
 			if (chan)
 				ast_autoservice_stop(chan);
 			if (bogus_chan)
-				ast_channel_free(chan);
+				ast_channel_release(chan);
 			return -1;
 		}
 		odbc_store->data = resultset;
@@ -640,7 +640,7 @@
 	if (chan)
 		ast_autoservice_stop(chan);
 	if (bogus_chan)
-		ast_channel_free(chan);
+		ast_channel_release(chan);
 	return 0;
 }
 
@@ -1030,7 +1030,7 @@
 	}
 
 	ast_str_substitute_variables(&sql, 0, chan, query->sql_read);
-	ast_channel_free(chan);
+	chan = ast_channel_release(chan);
 
 	if (a->argc == 5 && !strcmp(a->argv[4], "exec")) {
 		/* Execute the query */
@@ -1234,7 +1234,7 @@
 	pbx_builtin_pushvar_helper(chan, "VALUE", S_OR(a->argv[4], ""));
 	ast_str_substitute_variables(&sql, 0, chan, query->sql_write);
 	ast_debug(1, "SQL is %s\n", ast_str_buffer(sql));
-	ast_channel_free(chan);
+	chan = ast_channel_release(chan);
 
 	if (a->argc == 6 && !strcmp(a->argv[5], "exec")) {
 		/* Execute the query */




More information about the asterisk-commits mailing list