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
dc6a9a26
Commit
dc6a9a26
authored
Feb 12, 2020
by
Olivier Crête
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stun test: Check return value as is done elsewhere
parent
2ceb2083
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
stun/tests/test-format.c
stun/tests/test-format.c
+4
-1
No files found.
stun/tests/test-format.c
View file @
dc6a9a26
...
@@ -103,6 +103,8 @@ finish_check (StunAgent *agent, StunMessage *msg)
...
@@ -103,6 +103,8 @@ finish_check (StunAgent *agent, StunMessage *msg)
size_t
len
;
size_t
len
;
uint16_t
plen
;
uint16_t
plen
;
StunMessage
msg2
=
{
0
};
StunMessage
msg2
=
{
0
};
StunMessageReturn
val
;
msg2
.
agent
=
msg
->
agent
;
msg2
.
agent
=
msg
->
agent
;
msg2
.
buffer
=
buf
;
msg2
.
buffer
=
buf
;
msg2
.
buffer_len
=
sizeof
(
buf
);
msg2
.
buffer_len
=
sizeof
(
buf
);
...
@@ -117,7 +119,8 @@ finish_check (StunAgent *agent, StunMessage *msg)
...
@@ -117,7 +119,8 @@ finish_check (StunAgent *agent, StunMessage *msg)
if
(
stun_message_find
(
&
msg2
,
STUN_ATTRIBUTE_MESSAGE_INTEGRITY
,
&
plen
)
!=
NULL
)
if
(
stun_message_find
(
&
msg2
,
STUN_ATTRIBUTE_MESSAGE_INTEGRITY
,
&
plen
)
!=
NULL
)
fatal
(
"Missing HMAC test failed"
);
fatal
(
"Missing HMAC test failed"
);
stun_message_append_string
(
&
msg2
,
STUN_ATTRIBUTE_USERNAME
,
(
char
*
)
usr
);
val
=
stun_message_append_string
(
&
msg2
,
STUN_ATTRIBUTE_USERNAME
,
(
char
*
)
usr
);
assert
(
val
==
STUN_MESSAGE_RETURN_SUCCESS
);
len
=
stun_agent_finish_message
(
agent
,
&
msg2
,
pwd
,
strlen
((
char
*
)
pwd
));
len
=
stun_agent_finish_message
(
agent
,
&
msg2
,
pwd
,
strlen
((
char
*
)
pwd
));
...
...
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