Mailbox list would previously grow at each reload, containing duplicates.

Also, optimize the allocation of mailboxes to avoid additional memory structures.

(closes issue #16320)
 Reported by: Marquis
 Patches: 
       20100525__issue16320.diff.txt uploaded by tilghman (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@268817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2010-06-07 22:47:13 +00:00
parent 0122ccd29c
commit 8b790e4f06
2 changed files with 45 additions and 12 deletions

View File

@@ -1112,11 +1112,12 @@ struct sip_pkt {
* too much effort ...
*/
struct sip_mailbox {
char *mailbox;
char *context;
/*! Associated MWI subscription */
struct ast_event_sub *event_sub;
AST_LIST_ENTRY(sip_mailbox) entry;
unsigned int delme:1;
char *context;
char mailbox[2];
};
/*! \brief Structure for SIP peer data, we place calls to peers if registered or fixed IP address (host)