Skip to content
Snippets Groups Projects
Commit b2761899 authored by Mark Michelson's avatar Mark Michelson
Browse files

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.




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@207522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 3f8059f8
Branches
Tags
No related merge requests found
...@@ -98,6 +98,7 @@ static int pickup_do(struct ast_channel *chan, struct ast_channel *target) ...@@ -98,6 +98,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); 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_cel_report_event(target, AST_CEL_PICKUP, NULL, NULL, chan);
ast_party_connected_line_init(&connected_caller);
connected_caller = target->connected; connected_caller = target->connected;
connected_caller.source = AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER; connected_caller.source = AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER;
if (ast_channel_connected_line_macro(NULL, chan, &connected_caller, 0, 0)) { if (ast_channel_connected_line_macro(NULL, chan, &connected_caller, 0, 0)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment