diff options
author | Benny Prijono <bennylp@teluu.com> | 2008-03-22 09:33:26 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2008-03-22 09:33:26 +0000 |
commit | 855bcda8119a227e45d3cc897b53db98ca334c7a (patch) | |
tree | 25a39539c7fb0dcb2c9f504fd2a3c426dc97cd9e /pjnath/include | |
parent | 5b79998fe36e220752c5e6cdf5ca6b06faa0f407 (diff) |
Added comment about byte ordering in TURN CHANNEL-NUMBER attribute and modified select() parameter in TURN client
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1888 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjnath/include')
-rw-r--r-- | pjnath/include/pjnath/stun_msg.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pjnath/include/pjnath/stun_msg.h b/pjnath/include/pjnath/stun_msg.h index 15114808..5cf0f6c9 100644 --- a/pjnath/include/pjnath/stun_msg.h +++ b/pjnath/include/pjnath/stun_msg.h @@ -872,11 +872,17 @@ typedef struct pj_stun_uint_attr pj_stun_channel_number_attr; /** * Get 16bit channel number from 32bit integral value. + * Note that uint32 attributes are always stored in host byte order + * after they have been parsed from the PDU, so no need to do ntohs() + * here. */ #define PJ_STUN_GET_CH_NB(u32) ((pj_uint16_t)(u32>>16)) /** * Convert 16bit channel number into 32bit integral value. + * Note that uint32 attributes will be converted to network byte order + * when the attribute is written to packet, so no need to do htons() + * here. */ #define PJ_STUN_SET_CH_NB(chnum) (((pj_uint32_t)chnum) << 16) |