summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2010-07-02 12:23:20 +0000
committerBenny Prijono <bennylp@teluu.com>2010-07-02 12:23:20 +0000
commitb4fd4639975c5dc21a2956c5c6de31addabc45fb (patch)
treeaf14929106eebbcb39d9290c68819c1cd3144f9c
parenta9cb7d5e315127ed97189e749938cc881e601f22 (diff)
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
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3233 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--pjsip/include/pjsip/sip_msg.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/pjsip/include/pjsip/sip_msg.h b/pjsip/include/pjsip/sip_msg.h
index 1ca065fe..489fb025 100644
--- a/pjsip/include/pjsip/sip_msg.h
+++ b/pjsip/include/pjsip/sip_msg.h
@@ -465,7 +465,14 @@ typedef enum pjsip_status_code
PJSIP_SC_TSX_TIMEOUT = PJSIP_SC_REQUEST_TIMEOUT,
/*PJSIP_SC_TSX_RESOLVE_ERROR = 702,*/
- PJSIP_SC_TSX_TRANSPORT_ERROR = PJSIP_SC_SERVICE_UNAVAILABLE
+ PJSIP_SC_TSX_TRANSPORT_ERROR = PJSIP_SC_SERVICE_UNAVAILABLE,
+
+ /* This is not an actual status code, but rather a constant
+ * to force GCC to use 32bit to represent this enum, since
+ * we have a code in PJSUA-LIB that assigns an integer
+ * to this enum (see pjsua_acc_get_info() function).
+ */
+ PJSIP_SC__force_32bit = 0x7FFFFFFF
} pjsip_status_code;