summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2009-05-05 20:54:07 +0000
committerRichard Mudgett <rmudgett@digium.com>2009-05-05 20:54:07 +0000
commit7019ff68dbb4ff75ababced498e47b8e2e73d2d1 (patch)
treef87c5178c8af68a1d64575771784d259879db9e2 /apps
parent549740d44010112eb33909eed2d360cd39bd212f (diff)
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
Diffstat (limited to 'apps')
-rw-r--r--apps/app_dial.c2
-rw-r--r--apps/app_directed_pickup.c2
-rw-r--r--apps/app_queue.c2
3 files changed, 5 insertions, 1 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 44c122878..77d8a8623 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -864,6 +864,8 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
#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))
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))) {
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 1c9d0b730..eee4e5569 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2846,6 +2846,8 @@ static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callatte
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);