Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
libnice
libnice
Commits
84c330b2
Commit
84c330b2
authored
Mar 16, 2007
by
Dafydd Harries
Browse files
agent: use stun_message_find_attribute ()
darcs-hash:20070316070638-c9803-2189e68b176266f00b4e51a5a918144c9a6aacfa.gz
parent
b92c102f
Changes
1
Hide whitespace changes
Inline
Side-by-side
agent/agent.c
View file @
84c330b2
...
...
@@ -479,7 +479,7 @@ _handle_stun_binding_request (
StunMessage
*
msg
)
{
GSList
*
i
;
StunAttribute
*
*
attr
;
StunAttribute
*
attr
;
gchar
*
username
=
NULL
;
NiceCandidate
*
remote
=
NULL
;
...
...
@@ -510,18 +510,14 @@ _handle_stun_binding_request (
* --> send error
*/
if
(
msg
->
attributes
)
for
(
attr
=
msg
->
attributes
;
*
attr
;
attr
++
)
if
((
*
attr
)
->
type
==
STUN_ATTRIBUTE_USERNAME
)
{
username
=
(
*
attr
)
->
username
;
break
;
}
attr
=
stun_message_find_attribute
(
msg
,
STUN_ATTRIBUTE_USERNAME
);
if
(
username
==
NULL
)
if
(
attr
==
NULL
)
/* no username attribute found */
goto
ERROR
;
username
=
attr
->
username
;
/* validate username */
/* XXX: Should first try and find a remote candidate with a matching
* transport address, and fall back to matching on username only after that.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment