[asterisk-commits] kpfleming: trunk r43921 - in /trunk: ./
apps/app_queue.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Thu Sep 28 10:38:08 MST 2006
Author: kpfleming
Date: Thu Sep 28 12:38:07 2006
New Revision: 43921
URL: http://svn.digium.com/view/asterisk?rev=43921&view=rev
Log:
Merged revisions 43919 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r43919 | kpfleming | 2006-09-28 12:35:42 -0500 (Thu, 28 Sep 2006) | 10 lines
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:
trunk/ (props changed)
trunk/apps/app_queue.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_queue.c?rev=43921&r1=43920&r2=43921&view=diff
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Thu Sep 28 12:38:07 2006
@@ -3671,7 +3671,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];
@@ -3788,22 +3788,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 (new) {
More information about the asterisk-commits
mailing list