[asterisk-commits] rmudgett: trunk r192590 - in /trunk: apps/ channels/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue May 5 15:54:16 CDT 2009


Author: rmudgett
Date: Tue May  5 15:54:07 2009
New Revision: 192590

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=192590
Log:
Fixed crashes from issue8824 review board channel locking changes.

The local struct ast_party_connected_line connected_caller variable
was uninitialized when the copy function was called.

Modified:
    trunk/apps/app_dial.c
    trunk/apps/app_directed_pickup.c
    trunk/apps/app_queue.c
    trunk/channels/chan_sip.c
    trunk/main/features.c

Modified: trunk/apps/app_dial.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_dial.c?view=diff&rev=192590&r1=192589&r2=192590
==============================================================================
--- trunk/apps/app_dial.c (original)
+++ trunk/apps/app_dial.c Tue May  5 15:54:07 2009
@@ -864,6 +864,8 @@
 #endif
 	struct ast_party_connected_line connected_caller;
 	struct ast_str *featurecode = ast_str_alloca(FEATURE_MAX_LEN + 1);
+
+	ast_party_connected_line_init(&connected_caller);
 	if (single) {
 		/* Turn off hold music, etc */
 		if (!ast_test_flag64(outgoing, OPT_MUSICBACK | OPT_RINGBACK))

Modified: trunk/apps/app_directed_pickup.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_directed_pickup.c?view=diff&rev=192590&r1=192589&r2=192590
==============================================================================
--- trunk/apps/app_directed_pickup.c (original)
+++ trunk/apps/app_directed_pickup.c Tue May  5 15:54:07 2009
@@ -97,6 +97,7 @@
 	ast_debug(1, "Call pickup on '%s' by '%s'\n", target->name, chan->name);
 
 	connected_caller = target->connected;
+	ast_party_connected_line_init(&target->connected);
 	connected_caller.source = AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER;
 	ast_channel_update_connected_line(chan, &connected_caller);
 
@@ -105,7 +106,6 @@
 	ast_channel_unlock(chan);
 	connected_caller.source = AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER;
 	ast_channel_queue_connected_line_update(chan, &connected_caller);
-	ast_party_connected_line_init(&target->connected);
 	ast_party_connected_line_free(&connected_caller);
 
 	if ((res = ast_answer(chan))) {

Modified: trunk/apps/app_queue.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_queue.c?view=diff&rev=192590&r1=192589&r2=192590
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Tue May  5 15:54:07 2009
@@ -2846,6 +2846,8 @@
 	struct ast_party_connected_line connected_caller;
 	char *inchan_name;
 
+	ast_party_connected_line_init(&connected_caller);
+
 	ast_channel_lock(qe->chan);
 	inchan_name = ast_strdupa(qe->chan->name);
 	ast_channel_unlock(qe->chan);

Modified: trunk/channels/chan_sip.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=192590&r1=192589&r2=192590
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue May  5 15:54:07 2009
@@ -20104,6 +20104,7 @@
 			ast_channel_unlock(targetcall_pvt->owner);
 		}
 
+		ast_party_connected_line_init(&connected_caller);
 		if (target.chan2) {
 			if (current->chan2) {
 				/* Tell each of the other channels to whom they are now connected */

Modified: trunk/main/features.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/features.c?view=diff&rev=192590&r1=192589&r2=192590
==============================================================================
--- trunk/main/features.c (original)
+++ trunk/main/features.c Tue May  5 15:54:07 2009
@@ -1389,7 +1389,7 @@
 	struct ast_bridge_config bconfig;
 	struct ast_frame *f;
 	int l;
-	struct ast_party_connected_line connected_line = {{0,},};
+	struct ast_party_connected_line connected_line;
 	struct ast_datastore *features_datastore;
 	struct ast_dial_features *dialfeatures = NULL;
 
@@ -1459,6 +1459,7 @@
 	newchan = feature_request_and_dial(transferer, transferee, "Local", ast_best_codec(transferer->nativeformats),
 		xferto, atxfernoanswertimeout, &outstate, transferer->cid.cid_num, transferer->cid.cid_name, 1, transferer->language);
 
+	ast_party_connected_line_init(&connected_line);
 	if (!ast_check_hangup(transferer)) {
 		/* Transferer is up - old behaviour */
 		ast_indicate(transferer, -1);




More information about the asterisk-commits mailing list