From 7019ff68dbb4ff75ababced498e47b8e2e73d2d1 Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Tue, 5 May 2009 20:54:07 +0000 Subject: 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. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192590 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_directed_pickup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/app_directed_pickup.c') diff --git a/apps/app_directed_pickup.c b/apps/app_directed_pickup.c index 0cf691c59..283846e15 100644 --- a/apps/app_directed_pickup.c +++ b/apps/app_directed_pickup.c @@ -97,6 +97,7 @@ static int pickup_do(struct ast_channel *chan, struct ast_channel *target) 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 @@ static int pickup_do(struct ast_channel *chan, struct ast_channel *target) 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))) { -- cgit v1.2.3