More ticket #485: wrong encoding of CHANNEL-NUMBER attribute
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@1885 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
parent
573b78c5b1
commit
e2303e3f45
|
@ -873,12 +873,12 @@ typedef struct pj_stun_uint_attr pj_stun_channel_number_attr;
|
|||
/**
|
||||
* Get 16bit channel number from 32bit integral value.
|
||||
*/
|
||||
#define PJ_STUN_GET_CH_NB(u32) pj_ntohs((pj_uint16_t)(u32>>16))
|
||||
#define PJ_STUN_GET_CH_NB(u32) ((pj_uint16_t)(u32>>16))
|
||||
|
||||
/**
|
||||
* Convert 16bit channel number into 32bit integral value.
|
||||
*/
|
||||
#define PJ_STUN_SET_CH_NB(chnum) (((pj_uint32_t)pj_htons(chnum)) << 16)
|
||||
#define PJ_STUN_SET_CH_NB(chnum) (((pj_uint32_t)chnum) << 16)
|
||||
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue