Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libnice
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
libnice
Commits
4f363847
Commit
4f363847
authored
Jan 22, 2019
by
Olivier Crête
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stunagent: Replace more magic numbers with defines
parent
df5b9e64
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
stun/stunagent.c
stun/stunagent.c
+5
-2
No files found.
stun/stunagent.c
View file @
4f363847
...
@@ -220,7 +220,9 @@ StunValidationStatus stun_agent_validate (StunAgent *agent, StunMessage *msg,
...
@@ -220,7 +220,9 @@ StunValidationStatus stun_agent_validate (StunAgent *agent, StunMessage *msg,
(
stun_message_get_class
(
msg
)
==
STUN_ERROR
&&
(
stun_message_get_class
(
msg
)
==
STUN_ERROR
&&
stun_message_find_error
(
msg
,
&
error_code
)
==
stun_message_find_error
(
msg
,
&
error_code
)
==
STUN_MESSAGE_RETURN_SUCCESS
&&
STUN_MESSAGE_RETURN_SUCCESS
&&
(
error_code
==
400
||
error_code
==
401
||
error_code
==
438
))
||
(
error_code
==
STUN_ERROR_BAD_REQUEST
||
error_code
==
STUN_ERROR_UNAUTHORIZED
||
error_code
==
STUN_ERROR_STALE_NONCE
))
||
(
stun_message_get_class
(
msg
)
==
STUN_INDICATION
&&
(
stun_message_get_class
(
msg
)
==
STUN_INDICATION
&&
(
agent
->
usage_flags
&
STUN_AGENT_USAGE_LONG_TERM_CREDENTIALS
||
(
agent
->
usage_flags
&
STUN_AGENT_USAGE_LONG_TERM_CREDENTIALS
||
agent
->
usage_flags
&
STUN_AGENT_USAGE_NO_INDICATION_AUTH
));
agent
->
usage_flags
&
STUN_AGENT_USAGE_NO_INDICATION_AUTH
));
...
@@ -327,7 +329,8 @@ StunValidationStatus stun_agent_validate (StunAgent *agent, StunMessage *msg,
...
@@ -327,7 +329,8 @@ StunValidationStatus stun_agent_validate (StunAgent *agent, StunMessage *msg,
}
else
if
(
!
(
stun_message_get_class
(
msg
)
==
STUN_ERROR
&&
}
else
if
(
!
(
stun_message_get_class
(
msg
)
==
STUN_ERROR
&&
stun_message_find_error
(
msg
,
&
error_code
)
==
stun_message_find_error
(
msg
,
&
error_code
)
==
STUN_MESSAGE_RETURN_SUCCESS
&&
STUN_MESSAGE_RETURN_SUCCESS
&&
(
error_code
==
400
||
error_code
==
401
)))
{
(
error_code
==
STUN_ERROR_BAD_REQUEST
||
error_code
==
STUN_ERROR_UNAUTHORIZED
)))
{
stun_debug
(
"STUN auth error: No message integrity attribute!"
);
stun_debug
(
"STUN auth error: No message integrity attribute!"
);
return
STUN_VALIDATION_UNAUTHORIZED
;
return
STUN_VALIDATION_UNAUTHORIZED
;
}
}
...
...
Write
Preview
Markdown
is supported
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