diff options
author | Youness Alaoui <kakaroto@kakaroto.(none)> | 2008-07-30 23:30:47 -0400 |
---|---|---|
committer | Youness Alaoui <kakaroto@kakaroto.(none)> | 2008-07-30 23:30:47 -0400 |
commit | 77ff1d201da36b8fc03607d7fca25586a225421c (patch) | |
tree | 71b804ecfd10072bf0ccd07fc691ca6fcf33d03e /stun/stunagent.c | |
parent | db3cb4f0f8f2ad562e7422bc6e22b9ad3245c2c8 (diff) | |
download | libnice-77ff1d201da36b8fc03607d7fca25586a225421c.tar.gz |
Adding a 'force validater' usage flag for the stun agent and made libnice use it for msn support
Diffstat (limited to 'stun/stunagent.c')
-rw-r--r-- | stun/stunagent.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/stun/stunagent.c b/stun/stunagent.c index 6206f20..df558cd 100644 --- a/stun/stunagent.c +++ b/stun/stunagent.c @@ -192,9 +192,10 @@ StunValidationStatus stun_agent_validate (StunAgent *agent, StunMessage *msg, return STUN_VALIDATION_UNAUTHORIZED_BAD_REQUEST; } - if (key == NULL && - (agent->usage_flags & STUN_AGENT_USAGE_IGNORE_CREDENTIALS) == 0 && - stun_message_has_attribute (msg, STUN_ATTRIBUTE_MESSAGE_INTEGRITY)) { + if (stun_message_has_attribute (msg, STUN_ATTRIBUTE_MESSAGE_INTEGRITY) && + ((key == NULL && + (agent->usage_flags & STUN_AGENT_USAGE_IGNORE_CREDENTIALS) == 0) || + (agent->usage_flags & STUN_AGENT_USAGE_FORCE_VALIDATER))) { username_len = 0; username = (uint8_t *) stun_message_find (msg, STUN_ATTRIBUTE_USERNAME, &username_len); |