diff options
author | Youness Alaoui <youness.alaoui@collabora.co.uk> | 2010-12-13 21:15:29 -0500 |
---|---|---|
committer | Youness Alaoui <youness.alaoui@collabora.co.uk> | 2010-12-14 20:53:30 -0500 |
commit | b48f8e6c6846c2b031d947b430119383cfa931eb (patch) | |
tree | d8fedd03427f731903d85f6a56e09d60f330c69e /stun | |
parent | cb29f9e7276651ebbafda3435e4a8acc083e4155 (diff) | |
download | libnice-b48f8e6c6846c2b031d947b430119383cfa931eb.tar.gz |
fix indentation issues
Diffstat (limited to 'stun')
-rw-r--r-- | stun/usages/turn.c | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/stun/usages/turn.c b/stun/usages/turn.c index 014534b..cd76fc3 100644 --- a/stun/usages/turn.c +++ b/stun/usages/turn.c @@ -106,7 +106,7 @@ size_t stun_usage_turn_create (StunAgent *agent, StunMessage *msg, } if ((compatibility == STUN_USAGE_TURN_COMPATIBILITY_DRAFT9 || - compatibility == STUN_USAGE_TURN_COMPATIBILITY_RFC5766) && + compatibility == STUN_USAGE_TURN_COMPATIBILITY_RFC5766) && request_props != STUN_USAGE_TURN_REQUEST_PORT_NORMAL) { uint32_t req = 0; @@ -223,40 +223,40 @@ size_t stun_usage_turn_create_permission (StunAgent *agent, StunMessage *msg, struct sockaddr *peer, StunUsageTurnCompatibility compatibility) { - stun_agent_init_request (agent, msg, buffer, buffer_len, - STUN_CREATEPERMISSION); + stun_agent_init_request (agent, msg, buffer, buffer_len, + STUN_CREATEPERMISSION); - /* PEER address */ - if (peer) { - if (stun_message_append_xor_addr (msg, STUN_ATTRIBUTE_XOR_PEER_ADDRESS, + /* PEER address */ + if (peer) { + if (stun_message_append_xor_addr (msg, STUN_ATTRIBUTE_XOR_PEER_ADDRESS, peer, sizeof(*peer)) != STUN_MESSAGE_RETURN_SUCCESS) { - return 0; - } - } - - /* nonce */ - if (nonce != NULL) { - if (stun_message_append_bytes (msg, STUN_ATTRIBUTE_NONCE, - nonce, nonce_len) != STUN_MESSAGE_RETURN_SUCCESS) - return 0; - } - - /* realm */ - if (realm != NULL) { - if (stun_message_append_bytes (msg, STUN_ATTRIBUTE_REALM, - realm, realm_len) != STUN_MESSAGE_RETURN_SUCCESS) - return 0; - } - - /* username */ - if (username != NULL) { - if (stun_message_append_bytes (msg, STUN_ATTRIBUTE_USERNAME, - username, username_len) != STUN_MESSAGE_RETURN_SUCCESS) - return 0; - } - - stun_debug("before stun_agent_finish_message \n"); - return stun_agent_finish_message (agent, msg, password, password_len); + return 0; + } + } + + /* nonce */ + if (nonce != NULL) { + if (stun_message_append_bytes (msg, STUN_ATTRIBUTE_NONCE, + nonce, nonce_len) != STUN_MESSAGE_RETURN_SUCCESS) + return 0; + } + + /* realm */ + if (realm != NULL) { + if (stun_message_append_bytes (msg, STUN_ATTRIBUTE_REALM, + realm, realm_len) != STUN_MESSAGE_RETURN_SUCCESS) + return 0; + } + + /* username */ + if (username != NULL) { + if (stun_message_append_bytes (msg, STUN_ATTRIBUTE_USERNAME, + username, username_len) != STUN_MESSAGE_RETURN_SUCCESS) + return 0; + } + + stun_debug("before stun_agent_finish_message \n"); + return stun_agent_finish_message (agent, msg, password, password_len); } @@ -339,7 +339,7 @@ StunUsageTurnReturn stun_usage_turn_process (StunMessage *msg, return STUN_USAGE_TURN_RETURN_ERROR; } } else if (compatibility == STUN_USAGE_TURN_COMPATIBILITY_MSN || - compatibility == STUN_USAGE_TURN_COMPATIBILITY_OC2007) { + compatibility == STUN_USAGE_TURN_COMPATIBILITY_OC2007) { val = stun_message_find_addr (msg, STUN_ATTRIBUTE_MSN_MAPPED_ADDRESS, addr, addrlen); |