diff options
author | Youness Alaoui <kakaroto@kakaroto.(none)> | 2008-09-10 17:10:24 -0400 |
---|---|---|
committer | Youness Alaoui <kakaroto@kakaroto.(none)> | 2008-09-10 17:10:24 -0400 |
commit | 84674be7bae06664537906f2b5b822172d7da856 (patch) | |
tree | 499a5c022405a40ae6c2df4301c9ee6f9746d94d /stun | |
parent | 5576d7e8d07c8d441dda69b34ca8e65825063cb8 (diff) | |
download | libnice-84674be7bae06664537906f2b5b822172d7da856.tar.gz |
We should validate correctly all local/remote candidate combinations
Diffstat (limited to 'stun')
-rw-r--r-- | stun/stunagent.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/stun/stunagent.c b/stun/stunagent.c index 79e2b65..e7c913c 100644 --- a/stun/stunagent.c +++ b/stun/stunagent.c @@ -76,11 +76,17 @@ bool stun_agent_default_validater (StunAgent *agent, int i; for (i = 0; val && val[i].username ; i++) { + stun_debug ("Comparing username '"); + stun_debug_bytes (username, username_len); + stun_debug ("' (%d) with '", username_len); + stun_debug_bytes (val[i].username, val[i].username_len); + stun_debug ("' (%d) : %d\n", + val[i].username_len, memcmp (username, val[i].username, username_len)); if (username_len == val[i].username_len && memcmp (username, val[i].username, username_len) == 0) { *password = (uint8_t *) val[i].password; *password_len = val[i].password_len; - + stun_debug ("Found valid username, returning password : '%s'\n", *password); return true; } } |