Summary:ASTERISK-01931: [patch] Use INET_ADDRSTRLEN to define all iabuf[] strings for use with ast_inet_ntoa() calls
Reporter:Rob Gagnon (rgagnon)Labels:
Date Opened:2004-06-30 13:03:21Date Closed:2008-01-15 15:01:29.000-0600
Versions:Frequency of
Environment:Attachments:( 0) patch20040630.txt
Description:To conform a little nicer, and save a bit of memory, this patch modifies all of the "char iabuf[80]" definitions to be "char iabuf[INET_ADDRSTRLEN]"  which does the following:

- The char buffers are smaller, using only the memory they need. (Saves approx 7,485 bytes in the compiled binaries)
- The macro makes the code more C-Conforming

Also, other calls to ast_inet_ntoa() where the buffer sent in was not named "iabuf" were changed to "iabuf" to keep a sort of naming convention (IE:  there were a couple of "tmp" and "ip" character names)

Comments:By: Digium Subversion (svnbot) 2008-01-15 15:01:29.000-0600

Repository: asterisk
Revision: 3364

U   trunk/acl.c
U   trunk/channels/chan_h323.c
U   trunk/channels/chan_iax.c
U   trunk/channels/chan_iax2.c
U   trunk/channels/chan_mgcp.c
U   trunk/channels/chan_sip.c
U   trunk/channels/chan_skinny.c
U   trunk/channels/iax2-parser.c
U   trunk/manager.c
U   trunk/res/res_osp.c
U   trunk/rtp.c

r3364 | markster | 2008-01-15 15:01:28 -0600 (Tue, 15 Jan 2008) | 2 lines

Use INET_ADDRLEN (bug ASTERISK-1931) (from airport!)