Ignore:
Timestamp:
Mar 22, 2008 9:33:26 AM (11 years ago)
Author:
bennylp
Message:

Added comment about byte ordering in TURN CHANNEL-NUMBER attribute and modified select() parameter in TURN client

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjnath/include/pjnath/stun_msg.h

    r1885 r1888  
    873873/** 
    874874 * Get 16bit channel number from 32bit integral value. 
     875 * Note that uint32 attributes are always stored in host byte order 
     876 * after they have been parsed from the PDU, so no need to do ntohs() 
     877 * here. 
    875878 */ 
    876879#define PJ_STUN_GET_CH_NB(u32)      ((pj_uint16_t)(u32>>16)) 
     
    878881/** 
    879882 * Convert 16bit channel number into 32bit integral value. 
     883 * Note that uint32 attributes will be converted to network byte order 
     884 * when the attribute is written to packet, so no need to do htons() 
     885 * here. 
    880886 */ 
    881887#define PJ_STUN_SET_CH_NB(chnum)    (((pj_uint32_t)chnum) << 16) 
Note: See TracChangeset for help on using the changeset viewer.