[Home]

Summary:ASTERISK-06843: [patch] List macro janitor for voicemail
Reporter:Tilghman Lesher (tilghman)Labels:
Date Opened:2006-04-25 07:27:55Date Closed:2006-04-28 20:09:02
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20060425__voicemail_zones_janitor.diff.txt
Description:Changes the remaining lists in voicemail to use list macros
Comments:By: Russell Bryant (russell) 2006-04-28 20:08:39

I have added this to the trunk in rev 23250 with some mods ...

- I added locking to this list.  I know it wasn't used before, but it needed it.

- I also changed a couple of the loops that freed elements of a list.

Instead of ...

  while (!AST_LIST_EMPTY(&thelist)) {
     cur = AST_LIST_REMOVE_HEAD(&thelist, list);
     free(cur);
  }

I made it ...

  while ((cur = AST_LIST_REMOVE_HEAD(&thelist, list)))
     free(cur);