[svn-commits] kpfleming: branch 1.4 r43919 - in /branches/1.4: ./
apps/app_queue.c
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Thu Sep 28 10:35:43 MST 2006
Author: kpfleming
Date: Thu Sep 28 12:35:42 2006
New Revision: 43919
URL: http://svn.digium.com/view/asterisk?rev=43919&view=rev
Log:
Merged revisions 43916 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r43916 | kpfleming | 2006-09-28 12:31:57 -0500 (Thu, 28 Sep 2006) | 2 lines
fix buggy (and overly complex) loop used during reload of app_queue for static member list updating
........
Modified:
branches/1.4/ (props changed)
branches/1.4/apps/app_queue.c
Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Modified: branches/1.4/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_queue.c?rev=43919&r1=43918&r2=43919&view=diff
==============================================================================
--- branches/1.4/apps/app_queue.c (original)
+++ branches/1.4/apps/app_queue.c Thu Sep 28 12:35:42 2006
@@ -3708,7 +3708,7 @@
struct ast_config *cfg;
char *cat, *tmp;
struct ast_variable *var;
- struct member *prev, *cur, *newm;
+ struct member *prev, *cur, *newm, *next;
int new;
const char *general_val = NULL;
char parse[80];
@@ -3825,22 +3825,19 @@
}
/* Free remaining members marked as delme */
- for (prev = NULL, newm = NULL, cur = q->members; cur; prev = cur, cur = cur->next) {
- if (newm) {
- free(newm);
- newm = NULL;
- }
-
- if (cur->delme) {
- if (prev) {
- prev->next = cur->next;
- newm = cur;
- } else {
- q->members = cur->next;
- newm = cur;
- }
- remove_from_interfaces(cur->interface);
- }
+ for (prev = NULL, cur = q->members, next = cur ? cur->next : NULL;
+ cur;
+ cur = next, next = cur ? cur->next : NULL) {
+ if (!cur->delme)
+ continue;
+
+ if (prev)
+ prev->next = next;
+ else
+ q->members = next;
+
+ remove_from_interfaces(cur->interface);
+ free(cur);
}
if (q->strategy == QUEUE_STRATEGY_ROUNDROBIN)
More information about the svn-commits
mailing list