[Home]

Summary:ASTERISK-06220: [patch] Converting /(root) to use *alloc() wrappers - 2
Reporter:Matthew Roth (matthew roth)Labels:
Date Opened:2006-01-30 17:06:23.000-0600Date Closed:2006-02-14 18:49:13.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) root_astmm_to_chanvars-alloc_wrappers-1.2.patch
Description:This patch updates the following files in the root source directory to use the new *alloc() wrappers:

- /astmm.c
- /autoservice.c
- /callerid.c
- /cdr.c
- /channel.c
- /chanvars.c

The following cleanup tasks were also performed on the updated code:

- malloc() + memset() consolidated to ast_calloc()
- allocations and null checks consolidated to 1 line
- sizeof calls changed to reflect the coding guidelines
- lists of #define-d numeric constants converted to enums
Comments:By: Matthew Roth (matthew roth) 2006-01-31 14:47:10.000-0600

The current patch is "root_astmm_to_chanvars-alloc_wrappers-1.1.patch".

Prior to committing it to /trunk, please take a look at the following post to the dev list:

- http://lists.digium.com/pipermail/asterisk-dev/2006-January/018383.html

It details a concern that I have with one of the changes I made to astmm.c.  I'm fairly confident in the change, but I think it bears scrutiny.  

If any changes are necessary, leave a note and I will make them.

Thanks  = )

By: Matthew Roth (matthew roth) 2006-01-31 17:28:50.000-0600

The current patch is now "root_astmm_to_chanvars-alloc_wrappers-1.2.patch".

Following the advice of Kevin and Russell, I have removed the *alloc() wrappers from astmm.c and modified the allocation error messages to be more accurate.

- http://lists.digium.com/pipermail/asterisk-dev/2006-January/018388.html
- http://lists.digium.com/pipermail/asterisk-dev/2006-January/018389.html

I'll monitor this issue and the dev list for any more tips.

Thanks!

By: Kevin P. Fleming (kpfleming) 2006-02-14 18:49:13.000-0600

Committed to trunk, thanks!