[asterisk-commits] mmichelson: trunk r207522 - /trunk/apps/app_directed_pickup.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 20 17:13:38 CDT 2009


Author: mmichelson
Date: Mon Jul 20 17:13:34 2009
New Revision: 207522

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=207522
Log:
Initialize connected line instance when doing a directed pickup.

This helps to prevent a crash which may occur due to our freeing
garbage due to a struct being uninitialized.



Modified:
    trunk/apps/app_directed_pickup.c

Modified: trunk/apps/app_directed_pickup.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_directed_pickup.c?view=diff&rev=207522&r1=207521&r2=207522
==============================================================================
--- trunk/apps/app_directed_pickup.c (original)
+++ trunk/apps/app_directed_pickup.c Mon Jul 20 17:13:34 2009
@@ -98,6 +98,7 @@
 	ast_debug(1, "Call pickup on '%s' by '%s'\n", target->name, chan->name);
 	ast_cel_report_event(target, AST_CEL_PICKUP, NULL, NULL, chan);
 
+	ast_party_connected_line_init(&connected_caller);
 	connected_caller = target->connected;
 	connected_caller.source = AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER;
 	if (ast_channel_connected_line_macro(NULL, chan, &connected_caller, 0, 0)) {




More information about the asterisk-commits mailing list