[asterisk-commits] bweschke: trunk r43875 - in /trunk: ./
apps/app_queue.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Thu Sep 28 08:32:49 MST 2006
Author: bweschke
Date: Thu Sep 28 10:32:48 2006
New Revision: 43875
URL: http://svn.digium.com/view/asterisk?rev=43875&view=rev
Log:
Merged revisions 43873 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r43873 | bweschke | 2006-09-28 11:29:21 -0400 (Thu, 28 Sep 2006) | 11 lines
Merged revisions 43871 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r43871 | bweschke | 2006-09-28 11:18:05 -0400 (Thu, 28 Sep 2006) | 3 lines
Fix race condion crash with get_member_status (#7864 - tim_ringenbach reported and patched)
........
................
Modified:
trunk/ (props changed)
trunk/apps/app_queue.c
Propchange: trunk/
------------------------------------------------------------------------------
--- branch-1.4-merged (original)
+++ branch-1.4-merged Thu Sep 28 10:32:48 2006
@@ -1,1 +1,1 @@
-/branches/1.4:1-43376,43383,43386,43388,43392,43396,43405,43410,43422,43441,43445,43450,43454,43456,43464,43466,43469,43477,43482,43486,43489,43492,43518,43524,43553,43564,43616,43635-43702,43704-43755,43757-43800,43802-43846,43852,43861-43862,43864
+/branches/1.4:1-43376,43383,43386,43388,43392,43396,43405,43410,43422,43441,43445,43450,43454,43456,43464,43466,43469,43477,43482,43486,43489,43492,43518,43524,43553,43564,43616,43635-43702,43704-43755,43757-43800,43802-43846,43852,43861-43862,43864,43873
Modified: trunk/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_queue.c?rev=43875&r1=43874&r2=43875&view=diff
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Thu Sep 28 10:32:48 2006
@@ -463,11 +463,12 @@
QUEUE_NORMAL
};
-static enum queue_member_status get_member_status(const struct call_queue *q, int max_penalty)
+static enum queue_member_status get_member_status(struct call_queue *q, int max_penalty)
{
struct member *member;
enum queue_member_status result = QUEUE_NO_MEMBERS;
+ ast_mutex_lock(&q->lock);
for (member = q->members; member; member = member->next) {
if (max_penalty && (member->penalty > max_penalty))
continue;
@@ -482,10 +483,12 @@
result = QUEUE_NO_REACHABLE_MEMBERS;
break;
default:
+ ast_mutex_unlock(&q->lock);
return QUEUE_NORMAL;
}
}
+ ast_mutex_unlock(&q->lock);
return result;
}
More information about the asterisk-commits
mailing list