summaryrefslogtreecommitdiff
path: root/pjnath
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2008-03-20 18:26:26 +0000
committerBenny Prijono <bennylp@teluu.com>2008-03-20 18:26:26 +0000
commit2e79676442fc454d3346aa87e4bfb886bd1c2a53 (patch)
tree55fde53a1ffbc9138c9b088263458cdf5e2f9100 /pjnath
parentf5c4ac3cbadd515c83b71618e7ff2b1683c2aca2 (diff)
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
Diffstat (limited to 'pjnath')
-rw-r--r--pjnath/include/pjnath/stun_msg.h4
-rw-r--r--pjnath/include/pjnath/turn_session.h2
2 files changed, 3 insertions, 3 deletions
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;