Summary:ASTERISK-06291: [patch] uninitialized vairable in function_sippeer()
Reporter:Luigi Rizzo (rizzo)Labels:
Date Opened:2006-02-12 07:17:47.000-0600Date Closed:2008-01-15 16:41:39.000-0600
Versions:Frequency of
Description:on SVN 9686 i get this error:

chan_sip.c: In function `function_sippeer':
chan_sip.c:9098: warning: `peername' might be used uninitialized in this function

in fact the bug is severe because peername is an input argument to
the next find_peer() call.
I am not sure what was the intention of the change in SVN9674 but perhaps
the variable 'peername' should be deleted and the next call to
find_peer() should use data instead of peername as an argument ?

Also the function should be declared static.
Comments:By: Russell Bryant (russell) 2006-02-13 10:44:07.000-0600

I had originally fixed this by initializing 'peername' to 'data', but I went ahead and removed 'peername' all together, since that was the one place it was used.

By: Digium Subversion (svnbot) 2008-01-15 16:41:38.000-0600

Repository: asterisk
Revision: 9757

U   trunk/channels/chan_sip.c

r9757 | russell | 2008-01-15 16:41:37 -0600 (Tue, 15 Jan 2008) | 2 lines

remove unneeded var (issue ASTERISK-6291)



By: Digium Subversion (svnbot) 2008-01-15 16:41:39.000-0600

Repository: asterisk
Revision: 9758

U   trunk/channels/chan_sip.c

r9758 | russell | 2008-01-15 16:41:38 -0600 (Tue, 15 Jan 2008) | 2 lines

declare function_sipppeer as static (issue ASTERISK-6291)