aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_queue.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-16 19:39:05 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-16 19:39:05 +0000
commit518ec0d586d0779288c61a600645317a74cf45a1 (patch)
treefc7efeacbc8c060a2306c3b4a27a56004b6870c3 /apps/app_queue.c
parent1c792f56218cf44e55bc3688228a84dc2a388c96 (diff)
Merged revisions 131358 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r131358 | mmichelson | 2008-07-16 14:37:42 -0500 (Wed, 16 Jul 2008) | 14 lines Merged revisions 131357 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r131357 | mmichelson | 2008-07-16 14:37:08 -0500 (Wed, 16 Jul 2008) | 6 lines Apparently, "thread safety" is important, whatever that means. :P (Thanks Russell!) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@131359 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r--apps/app_queue.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 45bf61daf..dcab13701 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -3747,7 +3747,7 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
* when the masquerade occurred. These other "ending" queue_log messages are unnecessary
*/
if (!attended_transfer_occurred(qe->chan)) {
- struct ast_datastore *transfer_ds = ast_channel_datastore_find(qe->chan, &queue_transfer_info, NULL);
+ struct ast_datastore *transfer_ds;
if (strcasecmp(oldcontext, qe->chan->context) || strcasecmp(oldexten, qe->chan->exten)) {
ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "TRANSFER", "%s|%s|%ld|%ld",
qe->chan->exten, qe->chan->context, (long) (callstart - qe->start),
@@ -3762,12 +3762,13 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
(long) (callstart - qe->start), (long) (time(NULL) - callstart), qe->opos);
send_agent_complete(qe, queuename, peer, member, callstart, vars, sizeof(vars), AGENT);
}
+ ast_channel_lock(qe->chan);
+ transfer_ds = ast_channel_datastore_find(qe->chan, &queue_transfer_info, NULL);
if (transfer_ds) {
- ast_channel_lock(qe->chan);
ast_channel_datastore_remove(qe->chan, transfer_ds);
ast_channel_datastore_free(transfer_ds);
- ast_channel_unlock(qe->chan);
}
+ ast_channel_unlock(qe->chan);
}
if (bridge != AST_PBX_NO_HANGUP_PEER)