[asterisk-dev] oej: trunk r216805 - /trunk/channels/chan_sip.c

Olle E. Johansson oej at edvina.net
Thu Sep 10 13:28:07 CDT 2009


10 sep 2009 kl. 19.51 skrev Russell Bryant:

> SVN commits to the Digium repositories wrote:
>> Author: oej
>> Date: Mon Sep  7 11:08:08 2009
>> New Revision: 216805
>>
>> URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=216805
>> Log:
>> Since it's possible to have more than 999 calls, I'm changing the  
>> call counter roof to something higher.
>>
>> Modified:
>>    trunk/channels/chan_sip.c
>>
>> Modified: trunk/channels/chan_sip.c
>> URL: http://svn.asterisk.org/svn-view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=216805&r1=216804&r2=216805
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> =====================================================================
>> --- trunk/channels/chan_sip.c (original)
>> +++ trunk/channels/chan_sip.c Mon Sep  7 11:08:08 2009
>> @@ -1205,10 +1205,10 @@
>> static int global_rtptimeout;		/*!< Time out call if no RTP */
>> static int global_rtpholdtimeout;	/*!< Time out call if no RTP  
>> during hold */
>> static int global_rtpkeepalive;		/*!< Send RTP keepalives */
>> -static int global_reg_timeout;	
>> +static int global_reg_timeout;
>> static int global_regattempts_max;	/*!< Registration attempts  
>> before giving up */
>> static int global_callcounter;		/*!< Enable call counters for all  
>> devices. This is currently enabled by setting the peer
>> -						call-limit to 999. When we remove the call-limit from the  
>> code, we can make it
>> +						call-limit to UINT_MAX. When we remove the call-limit from  
>> the code, we can make it
>> 						with just a boolean flag in the device structure */
>> static unsigned int global_tos_sip;		/*!< IP type of service for  
>> SIP packets */
>> static unsigned int global_tos_audio;		/*!< IP type of service for  
>> audio RTP packets */
>
> Please use INT_MAX instead of UINT_MAX since these fields are  
> specified
> as an int instead of an unsigned int.  Alternatively, they could be
> changed to unsigned int.
>
> The current usage of UINT_MAX with an int type will not behave as you
> expect.

Once more embarrased with a funny hat in the corner :-)
Thanks for the feedback, Russell!

/O



More information about the asterisk-dev mailing list