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
dc977770
Commit
dc977770
authored
Feb 23, 2009
by
Youness Alaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename STUN_USAGE_BIND_RETURN_RETRY into STUN_USAGE_BIND_RETURN_INVALID
parent
8b971219
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
stun/tests/test-bind.c
stun/tests/test-bind.c
+2
-2
stun/usages/bind.c
stun/usages/bind.c
+4
-4
stun/usages/bind.h
stun/usages/bind.h
+1
-1
No files found.
stun/tests/test-bind.c
View file @
dc977770
...
...
@@ -230,7 +230,7 @@ static void bad_responses (void)
val
=
stun_usage_bind_process
(
&
msg
,
(
struct
sockaddr
*
)
&
addr
,
&
addrlen
,
(
struct
sockaddr
*
)
&
addr
,
&
addrlen
);
assert
(
val
==
STUN_USAGE_BIND_RETURN_
RETRY
);
assert
(
val
==
STUN_USAGE_BIND_RETURN_
INVALID
);
/* Send response with wrong request type */
buf
[
0
]
|=
0x03
;
...
...
@@ -240,7 +240,7 @@ static void bad_responses (void)
buf
[
1
]
|=
0x10
;
val
=
stun_usage_bind_process
(
&
msg
,
(
struct
sockaddr
*
)
&
addr
,
&
addrlen
,
(
struct
sockaddr
*
)
&
addr
,
&
addrlen
);
assert
(
val
==
STUN_USAGE_BIND_RETURN_
RETRY
);
assert
(
val
==
STUN_USAGE_BIND_RETURN_
INVALID
);
close
(
fd
);
close
(
servfd
);
...
...
stun/usages/bind.c
View file @
dc977770
...
...
@@ -91,13 +91,13 @@ StunUsageBindReturn stun_usage_bind_process (StunMessage *msg,
StunMessageReturn
val
;
if
(
stun_message_get_method
(
msg
)
!=
STUN_BINDING
)
return
STUN_USAGE_BIND_RETURN_
RETRY
;
return
STUN_USAGE_BIND_RETURN_
INVALID
;
switch
(
stun_message_get_class
(
msg
))
{
case
STUN_REQUEST
:
case
STUN_INDICATION
:
return
STUN_USAGE_BIND_RETURN_
RETRY
;
return
STUN_USAGE_BIND_RETURN_
INVALID
;
case
STUN_RESPONSE
:
break
;
...
...
@@ -105,7 +105,7 @@ StunUsageBindReturn stun_usage_bind_process (StunMessage *msg,
case
STUN_ERROR
:
if
(
stun_message_find_error
(
msg
,
&
code
)
!=
STUN_MESSAGE_RETURN_SUCCESS
)
{
/* missing ERROR-CODE: ignore message */
return
STUN_USAGE_BIND_RETURN_
RETRY
;
return
STUN_USAGE_BIND_RETURN_
INVALID
;
}
/* NOTE: currently we ignore unauthenticated messages if the context
...
...
@@ -510,7 +510,7 @@ StunUsageBindReturn stun_usage_bind_run (const struct sockaddr *srv,
stun_timer_start
(
&
timer
);
ret
=
STUN_USAGE_TRANS_RETURN_RETRY
;
}
else
if
(
bind_ret
==
STUN_USAGE_BIND_RETURN_
RETRY
)
{
}
else
if
(
bind_ret
==
STUN_USAGE_BIND_RETURN_
INVALID
)
{
ret
=
STUN_USAGE_TRANS_RETURN_RETRY
;
}
else
{
return
bind_ret
;
...
...
stun/usages/bind.h
View file @
dc977770
...
...
@@ -58,7 +58,7 @@ extern "C" {
typedef
enum
{
STUN_USAGE_BIND_RETURN_SUCCESS
,
STUN_USAGE_BIND_RETURN_ERROR
,
STUN_USAGE_BIND_RETURN_
RETRY
,
STUN_USAGE_BIND_RETURN_
INVALID
,
STUN_USAGE_BIND_RETURN_ALTERNATE_SERVER
,
STUN_USAGE_BIND_RETURN_TIMEOUT
,
}
StunUsageBindReturn
;
...
...
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