[Home]

Summary:ASTERISK-06152: [patch] use list macro in app_queue.c
Reporter:Peng Yong (ppyy)Labels:
Date Opened:2006-01-21 02:24:26.000-0600Date Closed:2006-01-22 10:29:14.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_queue
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) patch.queue.listmacro
( 1) patch.queue.listmacro.3
Description:as title
Comments:By: Russell Bryant (russell) 2006-01-21 18:58:21.000-0600

1)  You can simplify the code in the part of your patch starting at line 839.  To remove an element from a list, you can use the following macro ...

  AST_LIST_REMOVE(&queues, q, list);

... where we had to use this before:

  if (!prev_q) {
     queues = q->next;
  } else {
     prev_q->next = q->next;
  }

This also means the the q_next variable is no longer needed.

2)  In the part of the patch that starts at 3403, instead of:

  if (!AST_LIST_FIRST(&queues))

you can use:

  if (AST_LIST_EMPTY(&queues))

By: Peng Yong (ppyy) 2006-01-22 06:37:21.000-0600

updated.

upload two files. first one corrupted when upload

By: Tilghman Lesher (tilghman) 2006-01-22 10:29:14.000-0600

Added to trunk