diff options
author | twilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2011-05-06 08:21:22 +0000 |
---|---|---|
committer | twilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2011-05-06 08:21:22 +0000 |
commit | 40c59ff4adf4c3d4f1898e8eeeb543c0efdf0768 (patch) | |
tree | 095909b408a2ab831137e8b796a055c967937c9c /apps | |
parent | 9c38f28e99ba6dc1fd8be5cf4245483964418705 (diff) |
Merged revisions 317584 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
................
r317584 | twilson | 2011-05-06 01:18:53 -0700 (Fri, 06 May 2011) | 20 lines
Merged revisions 317575 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
................
r317575 | twilson | 2011-05-06 01:04:17 -0700 (Fri, 06 May 2011) | 13 lines
Merged revisions 317574 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r317574 | twilson | 2011-05-06 00:55:21 -0700 (Fri, 06 May 2011) | 6 lines
Re-fix queue round-robin
This part of the change for r315596 was incorrect. No bridge occurs
when doing a roundrobin dial and no one answers, so this code shouldn't
have been removed.
........
................
................
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@317596 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_queue.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index e494c7ea6..8b1072e90 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -4566,6 +4566,17 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce if (need_weight) ao2_unlock(queues); lpeer = wait_for_answer(qe, outgoing, &to, &digit, numbusies, ast_test_flag(&(bridge_config.features_caller), AST_FEATURE_DISCONNECT), forwardsallowed, update_connectedline); + /* The ast_channel_datastore_remove() function could fail here if the + * datastore was moved to another channel during a masquerade. If this is + * the case, don't free the datastore here because later, when the channel + * to which the datastore was moved hangs up, it will attempt to free this + * datastore again, causing a crash + */ + ast_channel_lock(qe->chan); + if (datastore && !ast_channel_datastore_remove(qe->chan, datastore)) { + ast_datastore_free(datastore); + } + ast_channel_unlock(qe->chan); ao2_lock(qe->parent); if (qe->parent->strategy == QUEUE_STRATEGY_RRMEMORY || qe->parent->strategy == QUEUE_STRATEGY_RRORDERED) { store_next_rr(qe, outgoing); |