Changeset 3233 for pjproject


Ignore:
Timestamp:
Jul 2, 2010 12:23:20 PM (14 years ago)
Author:
bennylp
Message:

Misc (Re: #1068): fixed bug with pjsip_status_code enum, when an optimizing compiler decides to use 16bit integer to represent this enum. In PJSUA-LIB, there is a code which assigns 32bit value to a variable of this type, causing overflow. Thanks Rickard Angbratt for the report

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsip/sip_msg.h

    r2968 r3233  
    466466    PJSIP_SC_TSX_TIMEOUT = PJSIP_SC_REQUEST_TIMEOUT, 
    467467    /*PJSIP_SC_TSX_RESOLVE_ERROR = 702,*/ 
    468     PJSIP_SC_TSX_TRANSPORT_ERROR = PJSIP_SC_SERVICE_UNAVAILABLE 
     468    PJSIP_SC_TSX_TRANSPORT_ERROR = PJSIP_SC_SERVICE_UNAVAILABLE, 
     469 
     470    /* This is not an actual status code, but rather a constant 
     471     * to force GCC to use 32bit to represent this enum, since 
     472     * we have a code in PJSUA-LIB that assigns an integer 
     473     * to this enum (see pjsua_acc_get_info() function). 
     474     */ 
     475    PJSIP_SC__force_32bit = 0x7FFFFFFF 
    469476 
    470477} pjsip_status_code; 
Note: See TracChangeset for help on using the changeset viewer.