From 2e79676442fc454d3346aa87e4bfb886bd1c2a53 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Thu, 20 Mar 2008 18:26:26 +0000 Subject: More ticket #485: fixed TURN transport code point and REQUESTED-TRANSPORT attribute encoding git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1880 74dad513-b988-da41-8d7b-12977e46ad98 --- pjnath/include/pjnath/stun_msg.h | 4 ++-- pjnath/include/pjnath/turn_session.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'pjnath') diff --git a/pjnath/include/pjnath/stun_msg.h b/pjnath/include/pjnath/stun_msg.h index 31e40333..aa29f15e 100644 --- a/pjnath/include/pjnath/stun_msg.h +++ b/pjnath/include/pjnath/stun_msg.h @@ -1024,13 +1024,13 @@ typedef struct pj_stun_uint_attr pj_stun_req_transport_attr; /** * Get protocol value from 32bit TURN REQUESTED-TRANSPORT attribute. */ -#define PJ_STUN_GET_RT_PROTO(u32) (u32 >> 24) +#define PJ_STUN_GET_RT_PROTO(u32) (pj_ntohl(u32) >> 24) /** * Convert protocol value to be placed in 32bit TURN REQUESTED-TRANSPORT * attribute. */ -#define PJ_STUN_SET_RT_PROTO(proto) (((pj_uint32_t)(proto)) << 24) +#define PJ_STUN_SET_RT_PROTO(proto) pj_htonl(((pj_uint32_t)(proto)) << 24) diff --git a/pjnath/include/pjnath/turn_session.h b/pjnath/include/pjnath/turn_session.h index b4c18592..8a93414a 100644 --- a/pjnath/include/pjnath/turn_session.h +++ b/pjnath/include/pjnath/turn_session.h @@ -58,7 +58,7 @@ typedef struct pj_turn_session pj_turn_session; /** TURN transport types */ typedef enum pj_turn_tp_type { - PJ_TURN_TP_UDP = 16, /**< UDP. */ + PJ_TURN_TP_UDP = 17, /**< UDP. */ PJ_TURN_TP_TCP = 6, /**< TCP. */ PJ_TURN_TP_TLS = 256 /**< TLS. */ } pj_turn_tp_type; -- cgit v1.2.3