[Nice] [nice/master] Use replace unclear STUN_USAGE_TURN_REQUEST_PORT_BOTH with EVEN_AND_RESERVE
Olivier Crête
olivier.crete at collabora.co.uk
Wed Nov 5 14:02:13 PST 2008
---
stun/usages/turn.c | 3 +--
stun/usages/turn.h | 9 ++++-----
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/stun/usages/turn.c b/stun/usages/turn.c
index 4fa866c..247e21e 100644
--- a/stun/usages/turn.c
+++ b/stun/usages/turn.c
@@ -98,8 +98,7 @@ size_t stun_usage_turn_create (StunAgent *agent, StunMessage *msg,
uint32_t req = 0;
- if ((request_props & STUN_USAGE_TURN_REQUEST_PORT_BOTH) ==
- STUN_USAGE_TURN_REQUEST_PORT_BOTH){
+ if (request_props & STUN_USAGE_TURN_REQUEST_PORT_EVEN_AND_RESERVE) {
req |= REQUESTED_PROPS_R;
req |= REQUESTED_PROPS_E;
} else if (request_props & STUN_USAGE_TURN_REQUEST_PORT_EVEN) {
diff --git a/stun/usages/turn.h b/stun/usages/turn.h
index 41532b0..a4598f8 100644
--- a/stun/usages/turn.h
+++ b/stun/usages/turn.h
@@ -51,11 +51,10 @@ extern "C" {
# endif
-#define STUN_USAGE_TURN_REQUEST_PORT_NORMAL 0
-#define STUN_USAGE_TURN_REQUEST_PORT_ODD 1
-#define STUN_USAGE_TURN_REQUEST_PORT_EVEN 2
-#define STUN_USAGE_TURN_REQUEST_PORT_BOTH 3
-#define STUN_USAGE_TURN_REQUEST_PORT_PRESERVING 8
+#define STUN_USAGE_TURN_REQUEST_PORT_NORMAL (0)
+#define STUN_USAGE_TURN_REQUEST_PORT_EVEN (1)
+#define STUN_USAGE_TURN_REQUEST_PORT_EVEN_AND_RESERVE (1<<1)
+#define STUN_USAGE_TURN_REQUEST_PORT_PRESERVING (1<<2)
typedef enum {
STUN_USAGE_TURN_COMPATIBILITY_TD9,
--
1.5.6.5
More information about the Nice
mailing list