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
50fb51ff
Commit
50fb51ff
authored
Sep 15, 2008
by
Youness Alaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change ICE_COMPATIBILITY_ID19 into ICE_COMPATIBILITY_DRAFT19 for more clarity
parent
cec76525
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
32 additions
and
32 deletions
+32
-32
agent/agent.c
agent/agent.c
+5
-5
agent/agent.h
agent/agent.h
+1
-1
agent/conncheck.c
agent/conncheck.c
+6
-6
agent/discovery.c
agent/discovery.c
+1
-1
agent/test-add-remove-stream.c
agent/test-add-remove-stream.c
+1
-1
agent/test-fallback.c
agent/test-fallback.c
+2
-2
agent/test-fullmode.c
agent/test-fullmode.c
+2
-2
agent/test-mainloop.c
agent/test-mainloop.c
+1
-1
agent/test-poll.c
agent/test-poll.c
+1
-1
agent/test-recv.c
agent/test-recv.c
+1
-1
agent/test-restart.c
agent/test-restart.c
+2
-2
agent/test.c
agent/test.c
+1
-1
stun/tests/test-conncheck.c
stun/tests/test-conncheck.c
+6
-6
stun/usages/ice.c
stun/usages/ice.c
+1
-1
stun/usages/ice.h
stun/usages/ice.h
+1
-1
No files found.
agent/agent.c
View file @
50fb51ff
...
@@ -199,8 +199,8 @@ nice_agent_class_init (NiceAgentClass *klass)
...
@@ -199,8 +199,8 @@ nice_agent_class_init (NiceAgentClass *klass)
"compatibility"
,
"compatibility"
,
"ICE specification compatibility"
,
"ICE specification compatibility"
,
"The compatibility mode for the agent"
,
"The compatibility mode for the agent"
,
NICE_COMPATIBILITY_
ID
19
,
NICE_COMPATIBILITY_LAST
,
NICE_COMPATIBILITY_
DRAFT
19
,
NICE_COMPATIBILITY_LAST
,
NICE_COMPATIBILITY_
ID
19
,
NICE_COMPATIBILITY_
DRAFT
19
,
G_PARAM_READWRITE
|
G_PARAM_CONSTRUCT_ONLY
));
G_PARAM_READWRITE
|
G_PARAM_CONSTRUCT_ONLY
));
g_object_class_install_property
(
gobject_class
,
PROP_STUN_SERVER
,
g_object_class_install_property
(
gobject_class
,
PROP_STUN_SERVER
,
...
@@ -370,7 +370,7 @@ nice_agent_init (NiceAgent *agent)
...
@@ -370,7 +370,7 @@ nice_agent_init (NiceAgent *agent)
agent
->
discovery_timer_id
=
0
;
agent
->
discovery_timer_id
=
0
;
agent
->
conncheck_timer_id
=
0
;
agent
->
conncheck_timer_id
=
0
;
agent
->
keepalive_timer_id
=
0
;
agent
->
keepalive_timer_id
=
0
;
agent
->
compatibility
=
NICE_COMPATIBILITY_
ID
19
;
agent
->
compatibility
=
NICE_COMPATIBILITY_
DRAFT
19
;
stun_agent_init
(
&
agent
->
stun_agent
,
STUN_ALL_KNOWN_ATTRIBUTES
,
stun_agent_init
(
&
agent
->
stun_agent
,
STUN_ALL_KNOWN_ATTRIBUTES
,
STUN_COMPATIBILITY_3489BIS
,
STUN_COMPATIBILITY_3489BIS
,
...
@@ -479,7 +479,7 @@ nice_agent_set_property (
...
@@ -479,7 +479,7 @@ nice_agent_set_property (
case
PROP_COMPATIBILITY
:
case
PROP_COMPATIBILITY
:
agent
->
compatibility
=
g_value_get_uint
(
value
);
agent
->
compatibility
=
g_value_get_uint
(
value
);
if
(
agent
->
compatibility
==
NICE_COMPATIBILITY_
ID
19
)
{
if
(
agent
->
compatibility
==
NICE_COMPATIBILITY_
DRAFT
19
)
{
stun_agent_init
(
&
agent
->
stun_agent
,
STUN_ALL_KNOWN_ATTRIBUTES
,
stun_agent_init
(
&
agent
->
stun_agent
,
STUN_ALL_KNOWN_ATTRIBUTES
,
STUN_COMPATIBILITY_3489BIS
,
STUN_COMPATIBILITY_3489BIS
,
STUN_AGENT_USAGE_SHORT_TERM_CREDENTIALS
|
STUN_AGENT_USAGE_SHORT_TERM_CREDENTIALS
|
...
@@ -701,7 +701,7 @@ priv_add_new_candidate_discovery_turn (NiceAgent *agent,
...
@@ -701,7 +701,7 @@ priv_add_new_candidate_discovery_turn (NiceAgent *agent,
cdisco
->
component
=
stream_find_component_by_id
(
stream
,
component_id
);
cdisco
->
component
=
stream_find_component_by_id
(
stream
,
component_id
);
cdisco
->
agent
=
agent
;
cdisco
->
agent
=
agent
;
if
(
agent
->
compatibility
==
NICE_COMPATIBILITY_
ID
19
)
{
if
(
agent
->
compatibility
==
NICE_COMPATIBILITY_
DRAFT
19
)
{
stun_agent_init
(
&
cdisco
->
turn_agent
,
STUN_ALL_KNOWN_ATTRIBUTES
,
stun_agent_init
(
&
cdisco
->
turn_agent
,
STUN_ALL_KNOWN_ATTRIBUTES
,
STUN_COMPATIBILITY_3489BIS
,
STUN_COMPATIBILITY_3489BIS
,
long_term
?
STUN_AGENT_USAGE_LONG_TERM_CREDENTIALS
:
long_term
?
STUN_AGENT_USAGE_LONG_TERM_CREDENTIALS
:
...
...
agent/agent.h
View file @
50fb51ff
...
@@ -99,7 +99,7 @@ typedef enum
...
@@ -99,7 +99,7 @@ typedef enum
typedef
enum
typedef
enum
{
{
NICE_COMPATIBILITY_
ID
19
=
0
,
NICE_COMPATIBILITY_
DRAFT
19
=
0
,
NICE_COMPATIBILITY_GOOGLE
,
NICE_COMPATIBILITY_GOOGLE
,
NICE_COMPATIBILITY_MSN
,
NICE_COMPATIBILITY_MSN
,
NICE_COMPATIBILITY_LAST
=
NICE_COMPATIBILITY_MSN
NICE_COMPATIBILITY_LAST
=
NICE_COMPATIBILITY_MSN
...
...
agent/conncheck.c
View file @
50fb51ff
...
@@ -73,16 +73,16 @@ static int priv_timer_expired (GTimeVal *restrict timer, GTimeVal *restrict now)
...
@@ -73,16 +73,16 @@ static int priv_timer_expired (GTimeVal *restrict timer, GTimeVal *restrict now)
}
}
static
StunUsageIceCompatibility
priv_agent_to_ice_compatibility
(
NiceAgent
*
agent
)
{
static
StunUsageIceCompatibility
priv_agent_to_ice_compatibility
(
NiceAgent
*
agent
)
{
return
agent
->
compatibility
==
NICE_COMPATIBILITY_
ID
19
?
return
agent
->
compatibility
==
NICE_COMPATIBILITY_
DRAFT
19
?
STUN_USAGE_ICE_COMPATIBILITY_
ID
19
:
STUN_USAGE_ICE_COMPATIBILITY_
DRAFT
19
:
agent
->
compatibility
==
NICE_COMPATIBILITY_GOOGLE
?
agent
->
compatibility
==
NICE_COMPATIBILITY_GOOGLE
?
STUN_USAGE_ICE_COMPATIBILITY_GOOGLE
:
STUN_USAGE_ICE_COMPATIBILITY_GOOGLE
:
agent
->
compatibility
==
NICE_COMPATIBILITY_MSN
?
agent
->
compatibility
==
NICE_COMPATIBILITY_MSN
?
STUN_USAGE_ICE_COMPATIBILITY_MSN
:
STUN_USAGE_ICE_COMPATIBILITY_
ID
19
;
STUN_USAGE_ICE_COMPATIBILITY_MSN
:
STUN_USAGE_ICE_COMPATIBILITY_
DRAFT
19
;
}
}
static
StunUsageTurnCompatibility
priv_agent_to_turn_compatibility
(
NiceAgent
*
agent
)
{
static
StunUsageTurnCompatibility
priv_agent_to_turn_compatibility
(
NiceAgent
*
agent
)
{
return
agent
->
compatibility
==
NICE_COMPATIBILITY_
ID
19
?
return
agent
->
compatibility
==
NICE_COMPATIBILITY_
DRAFT
19
?
STUN_USAGE_TURN_COMPATIBILITY_TD9
:
STUN_USAGE_TURN_COMPATIBILITY_TD9
:
agent
->
compatibility
==
NICE_COMPATIBILITY_GOOGLE
?
agent
->
compatibility
==
NICE_COMPATIBILITY_GOOGLE
?
STUN_USAGE_TURN_COMPATIBILITY_GOOGLE
:
STUN_USAGE_TURN_COMPATIBILITY_GOOGLE
:
...
@@ -901,7 +901,7 @@ int conn_check_add_for_candidate (NiceAgent *agent, guint stream_id, Component *
...
@@ -901,7 +901,7 @@ int conn_check_add_for_candidate (NiceAgent *agent, guint stream_id, Component *
/* note: do not create pairs where local candidate is
/* note: do not create pairs where local candidate is
* a srv-reflexive (ICE 5.7.3. "Pruning the Pairs" ID-19) */
* a srv-reflexive (ICE 5.7.3. "Pruning the Pairs" ID-19) */
if
(
agent
->
compatibility
==
NICE_COMPATIBILITY_
ID
19
&&
if
(
agent
->
compatibility
==
NICE_COMPATIBILITY_
DRAFT
19
&&
local
->
type
==
NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE
)
local
->
type
==
NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE
)
continue
;
continue
;
...
@@ -1010,7 +1010,7 @@ size_t priv_gen_username (NiceAgent *agent, guint component_id,
...
@@ -1010,7 +1010,7 @@ size_t priv_gen_username (NiceAgent *agent, guint component_id,
gsize
local_len
=
strlen
(
local
);
gsize
local_len
=
strlen
(
local
);
if
(
remote_len
>
0
&&
local_len
>
0
)
{
if
(
remote_len
>
0
&&
local_len
>
0
)
{
if
(
agent
->
compatibility
==
NICE_COMPATIBILITY_
ID
19
&&
if
(
agent
->
compatibility
==
NICE_COMPATIBILITY_
DRAFT
19
&&
dest_len
>=
remote_len
+
local_len
+
1
)
{
dest_len
>=
remote_len
+
local_len
+
1
)
{
memcpy
(
dest
,
remote
,
remote_len
);
memcpy
(
dest
,
remote
,
remote_len
);
len
+=
remote_len
;
len
+=
remote_len
;
...
...
agent/discovery.c
View file @
50fb51ff
...
@@ -70,7 +70,7 @@ static inline int priv_timer_expired (GTimeVal *restrict timer, GTimeVal *restri
...
@@ -70,7 +70,7 @@ static inline int priv_timer_expired (GTimeVal *restrict timer, GTimeVal *restri
}
}
static
StunUsageTurnCompatibility
priv_agent_to_turn_compatibility
(
NiceAgent
*
agent
)
{
static
StunUsageTurnCompatibility
priv_agent_to_turn_compatibility
(
NiceAgent
*
agent
)
{
return
agent
->
compatibility
==
NICE_COMPATIBILITY_
ID
19
?
return
agent
->
compatibility
==
NICE_COMPATIBILITY_
DRAFT
19
?
STUN_USAGE_TURN_COMPATIBILITY_TD9
:
STUN_USAGE_TURN_COMPATIBILITY_TD9
:
agent
->
compatibility
==
NICE_COMPATIBILITY_GOOGLE
?
agent
->
compatibility
==
NICE_COMPATIBILITY_GOOGLE
?
STUN_USAGE_TURN_COMPATIBILITY_GOOGLE
:
STUN_USAGE_TURN_COMPATIBILITY_GOOGLE
:
...
...
agent/test-add-remove-stream.c
View file @
50fb51ff
...
@@ -57,7 +57,7 @@ main (void)
...
@@ -57,7 +57,7 @@ main (void)
if
(
!
nice_address_set_from_string
(
&
addr
,
"127.0.0.1"
))
if
(
!
nice_address_set_from_string
(
&
addr
,
"127.0.0.1"
))
g_assert_not_reached
();
g_assert_not_reached
();
agent
=
nice_agent_new
(
NULL
,
NICE_COMPATIBILITY_
ID
19
);
agent
=
nice_agent_new
(
NULL
,
NICE_COMPATIBILITY_
DRAFT
19
);
nice_agent_add_local_address
(
agent
,
&
addr
);
nice_agent_add_local_address
(
agent
,
&
addr
);
g_assert
(
nice_agent_add_stream
(
agent
,
1
)
==
1
);
g_assert
(
nice_agent_add_stream
(
agent
,
1
)
==
1
);
...
...
agent/test-fallback.c
View file @
50fb51ff
...
@@ -488,8 +488,8 @@ int main (void)
...
@@ -488,8 +488,8 @@ int main (void)
*/
*/
/* step: create the agents L and R */
/* step: create the agents L and R */
lagent
=
nice_agent_new
(
g_main_loop_get_context
(
global_mainloop
),
NICE_COMPATIBILITY_
ID
19
);
lagent
=
nice_agent_new
(
g_main_loop_get_context
(
global_mainloop
),
NICE_COMPATIBILITY_
DRAFT
19
);
ragent
=
nice_agent_new
(
g_main_loop_get_context
(
global_mainloop
),
NICE_COMPATIBILITY_
ID
19
);
ragent
=
nice_agent_new
(
g_main_loop_get_context
(
global_mainloop
),
NICE_COMPATIBILITY_
DRAFT
19
);
...
...
agent/test-fullmode.c
View file @
50fb51ff
...
@@ -775,8 +775,8 @@ int main (void)
...
@@ -775,8 +775,8 @@ int main (void)
*/
*/
/* step: create the agents L and R */
/* step: create the agents L and R */
lagent
=
nice_agent_new
(
g_main_loop_get_context
(
global_mainloop
),
NICE_COMPATIBILITY_
ID
19
);
lagent
=
nice_agent_new
(
g_main_loop_get_context
(
global_mainloop
),
NICE_COMPATIBILITY_
DRAFT
19
);
ragent
=
nice_agent_new
(
g_main_loop_get_context
(
global_mainloop
),
NICE_COMPATIBILITY_
ID
19
);
ragent
=
nice_agent_new
(
g_main_loop_get_context
(
global_mainloop
),
NICE_COMPATIBILITY_
DRAFT
19
);
/* step: add a timer to catch state changes triggered by signals */
/* step: add a timer to catch state changes triggered by signals */
timer_id
=
g_timeout_add
(
60000
,
timer_cb
,
NULL
);
timer_id
=
g_timeout_add
(
60000
,
timer_cb
,
NULL
);
...
...
agent/test-mainloop.c
View file @
50fb51ff
...
@@ -75,7 +75,7 @@ main (void)
...
@@ -75,7 +75,7 @@ main (void)
g_thread_init
(
NULL
);
g_thread_init
(
NULL
);
loop
=
g_main_loop_new
(
NULL
,
FALSE
);
loop
=
g_main_loop_new
(
NULL
,
FALSE
);
agent
=
nice_agent_new
(
g_main_loop_get_context
(
loop
),
NICE_COMPATIBILITY_
ID
19
);
agent
=
nice_agent_new
(
g_main_loop_get_context
(
loop
),
NICE_COMPATIBILITY_
DRAFT
19
);
nice_address_set_ipv4
(
&
addr
,
0x7f000001
);
nice_address_set_ipv4
(
&
addr
,
0x7f000001
);
nice_agent_add_local_address
(
agent
,
&
addr
);
nice_agent_add_local_address
(
agent
,
&
addr
);
stream
=
nice_agent_add_stream
(
agent
,
1
);
stream
=
nice_agent_add_stream
(
agent
,
1
);
...
...
agent/test-poll.c
View file @
50fb51ff
...
@@ -89,7 +89,7 @@ main (void)
...
@@ -89,7 +89,7 @@ main (void)
if
(
!
nice_address_set_from_string
(
&
addr
,
"127.0.0.1"
))
if
(
!
nice_address_set_from_string
(
&
addr
,
"127.0.0.1"
))
g_assert_not_reached
();
g_assert_not_reached
();
agent
=
nice_agent_new
(
NULL
,
NICE_COMPATIBILITY_
ID
19
);
agent
=
nice_agent_new
(
NULL
,
NICE_COMPATIBILITY_
DRAFT
19
);
nice_agent_add_local_address
(
agent
,
&
addr
);
nice_agent_add_local_address
(
agent
,
&
addr
);
stream_id
=
nice_agent_add_stream
(
agent
,
1
);
stream_id
=
nice_agent_add_stream
(
agent
,
1
);
nice_agent_gather_candidates
(
agent
,
stream_id
);
nice_agent_gather_candidates
(
agent
,
stream_id
);
...
...
agent/test-recv.c
View file @
50fb51ff
...
@@ -56,7 +56,7 @@ main (void)
...
@@ -56,7 +56,7 @@ main (void)
g_thread_init
(
NULL
);
g_thread_init
(
NULL
);
/* set up agent */
/* set up agent */
agent
=
nice_agent_new
(
NULL
,
NICE_COMPATIBILITY_
ID
19
);
agent
=
nice_agent_new
(
NULL
,
NICE_COMPATIBILITY_
DRAFT
19
);
g_assert
(
nice_address_set_from_string
(
&
addr
,
"192.168.0.1"
));
g_assert
(
nice_address_set_from_string
(
&
addr
,
"192.168.0.1"
));
nice_agent_add_local_address
(
agent
,
&
addr
);
nice_agent_add_local_address
(
agent
,
&
addr
);
stream_id
=
nice_agent_add_stream
(
agent
,
1
);
stream_id
=
nice_agent_add_stream
(
agent
,
1
);
...
...
agent/test-restart.c
View file @
50fb51ff
...
@@ -394,8 +394,8 @@ int main (void)
...
@@ -394,8 +394,8 @@ int main (void)
/* step: create the agents L and R */
/* step: create the agents L and R */
lagent
=
nice_agent_new
(
g_main_loop_get_context
(
global_mainloop
),
NICE_COMPATIBILITY_
ID
19
);
lagent
=
nice_agent_new
(
g_main_loop_get_context
(
global_mainloop
),
NICE_COMPATIBILITY_
DRAFT
19
);
ragent
=
nice_agent_new
(
g_main_loop_get_context
(
global_mainloop
),
NICE_COMPATIBILITY_
ID
19
);
ragent
=
nice_agent_new
(
g_main_loop_get_context
(
global_mainloop
),
NICE_COMPATIBILITY_
DRAFT
19
);
/* step: add a timer to catch state changes triggered by signals */
/* step: add a timer to catch state changes triggered by signals */
...
...
agent/test.c
View file @
50fb51ff
...
@@ -62,7 +62,7 @@ main (void)
...
@@ -62,7 +62,7 @@ main (void)
g_assert
(
nice_address_set_from_string
(
&
addr_remote
,
"192.168.0.2"
));
g_assert
(
nice_address_set_from_string
(
&
addr_remote
,
"192.168.0.2"
));
nice_address_set_port
(
&
addr_remote
,
2345
);
nice_address_set_port
(
&
addr_remote
,
2345
);
agent
=
nice_agent_new
(
NULL
,
NICE_COMPATIBILITY_
ID
19
);
agent
=
nice_agent_new
(
NULL
,
NICE_COMPATIBILITY_
DRAFT
19
);
g_assert
(
agent
->
local_addresses
==
NULL
);
g_assert
(
agent
->
local_addresses
==
NULL
);
...
...
stun/tests/test-conncheck.c
View file @
50fb51ff
...
@@ -98,7 +98,7 @@ int main (void)
...
@@ -98,7 +98,7 @@ int main (void)
len
=
sizeof
(
resp_buf
);
len
=
sizeof
(
resp_buf
);
val
=
stun_usage_ice_conncheck_create_reply
(
&
agent
,
&
req
,
val
=
stun_usage_ice_conncheck_create_reply
(
&
agent
,
&
req
,
&
resp
,
resp_buf
,
&
len
,
(
struct
sockaddr
*
)
&
ip4
,
&
resp
,
resp_buf
,
&
len
,
(
struct
sockaddr
*
)
&
ip4
,
sizeof
(
ip4
),
&
control
,
tie
,
STUN_USAGE_ICE_COMPATIBILITY_
ID
19
);
sizeof
(
ip4
),
&
control
,
tie
,
STUN_USAGE_ICE_COMPATIBILITY_
DRAFT
19
);
assert
(
val
==
EINVAL
);
assert
(
val
==
EINVAL
);
assert
(
len
==
0
);
assert
(
len
==
0
);
...
@@ -112,7 +112,7 @@ int main (void)
...
@@ -112,7 +112,7 @@ int main (void)
len
=
sizeof
(
resp_buf
);
len
=
sizeof
(
resp_buf
);
val
=
stun_usage_ice_conncheck_create_reply
(
&
agent
,
&
req
,
val
=
stun_usage_ice_conncheck_create_reply
(
&
agent
,
&
req
,
&
resp
,
resp_buf
,
&
len
,
(
struct
sockaddr
*
)
&
ip4
,
&
resp
,
resp_buf
,
&
len
,
(
struct
sockaddr
*
)
&
ip4
,
sizeof
(
ip4
),
&
control
,
tie
,
STUN_USAGE_ICE_COMPATIBILITY_
ID
19
);
sizeof
(
ip4
),
&
control
,
tie
,
STUN_USAGE_ICE_COMPATIBILITY_
DRAFT
19
);
assert
(
val
==
EPROTO
);
assert
(
val
==
EPROTO
);
assert
(
len
>
0
);
assert
(
len
>
0
);
...
@@ -166,7 +166,7 @@ int main (void)
...
@@ -166,7 +166,7 @@ int main (void)
len
=
sizeof
(
resp_buf
);
len
=
sizeof
(
resp_buf
);
val
=
stun_usage_ice_conncheck_create_reply
(
&
agent
,
&
req
,
val
=
stun_usage_ice_conncheck_create_reply
(
&
agent
,
&
req
,
&
resp
,
resp_buf
,
&
len
,
(
struct
sockaddr
*
)
&
ip4
,
&
resp
,
resp_buf
,
&
len
,
(
struct
sockaddr
*
)
&
ip4
,
sizeof
(
ip4
),
&
control
,
tie
,
STUN_USAGE_ICE_COMPATIBILITY_
ID
19
);
sizeof
(
ip4
),
&
control
,
tie
,
STUN_USAGE_ICE_COMPATIBILITY_
DRAFT
19
);
assert
(
val
==
0
);
assert
(
val
==
0
);
assert
(
len
>
0
);
assert
(
len
>
0
);
assert
(
stun_agent_validate
(
&
agent
,
&
resp
,
resp_buf
,
len
,
assert
(
stun_agent_validate
(
&
agent
,
&
resp
,
resp_buf
,
len
,
...
@@ -186,7 +186,7 @@ int main (void)
...
@@ -186,7 +186,7 @@ int main (void)
len
=
sizeof
(
resp_buf
);
len
=
sizeof
(
resp_buf
);
val
=
stun_usage_ice_conncheck_create_reply
(
&
agent
,
&
req
,
val
=
stun_usage_ice_conncheck_create_reply
(
&
agent
,
&
req
,
&
resp
,
resp_buf
,
&
len
,
(
struct
sockaddr
*
)
&
ip4
,
&
resp
,
resp_buf
,
&
len
,
(
struct
sockaddr
*
)
&
ip4
,
sizeof
(
ip4
),
&
control
,
tie
,
STUN_USAGE_ICE_COMPATIBILITY_
ID
19
);
sizeof
(
ip4
),
&
control
,
tie
,
STUN_USAGE_ICE_COMPATIBILITY_
DRAFT
19
);
assert
(
val
==
EAFNOSUPPORT
);
assert
(
val
==
EAFNOSUPPORT
);
assert
(
len
==
0
);
assert
(
len
==
0
);
...
@@ -206,7 +206,7 @@ int main (void)
...
@@ -206,7 +206,7 @@ int main (void)
control
=
true
;
control
=
true
;
val
=
stun_usage_ice_conncheck_create_reply
(
&
agent
,
&
req
,
val
=
stun_usage_ice_conncheck_create_reply
(
&
agent
,
&
req
,
&
resp
,
resp_buf
,
&
len
,
(
struct
sockaddr
*
)
&
ip4
,
&
resp
,
resp_buf
,
&
len
,
(
struct
sockaddr
*
)
&
ip4
,
sizeof
(
ip4
),
&
control
,
tie
,
STUN_USAGE_ICE_COMPATIBILITY_
ID
19
);
sizeof
(
ip4
),
&
control
,
tie
,
STUN_USAGE_ICE_COMPATIBILITY_
DRAFT
19
);
assert
(
val
==
EACCES
);
assert
(
val
==
EACCES
);
assert
(
len
>
0
);
assert
(
len
>
0
);
assert
(
control
==
false
);
assert
(
control
==
false
);
...
@@ -227,7 +227,7 @@ int main (void)
...
@@ -227,7 +227,7 @@ int main (void)
control
=
false
;
control
=
false
;
val
=
stun_usage_ice_conncheck_create_reply
(
&
agent
,
&
req
,
val
=
stun_usage_ice_conncheck_create_reply
(
&
agent
,
&
req
,
&
resp
,
resp_buf
,
&
len
,
(
struct
sockaddr
*
)
&
ip4
,
&
resp
,
resp_buf
,
&
len
,
(
struct
sockaddr
*
)
&
ip4
,
sizeof
(
ip4
),
&
control
,
tie
,
STUN_USAGE_ICE_COMPATIBILITY_
ID
19
);
sizeof
(
ip4
),
&
control
,
tie
,
STUN_USAGE_ICE_COMPATIBILITY_
DRAFT
19
);
assert
(
val
==
0
);
assert
(
val
==
0
);
assert
(
len
>
0
);
assert
(
len
>
0
);
assert
(
control
==
false
);
assert
(
control
==
false
);
...
...
stun/usages/ice.c
View file @
50fb51ff
...
@@ -62,7 +62,7 @@ stun_usage_ice_conncheck_create (StunAgent *agent, StunMessage *msg,
...
@@ -62,7 +62,7 @@ stun_usage_ice_conncheck_create (StunAgent *agent, StunMessage *msg,
stun_agent_init_request
(
agent
,
msg
,
buffer
,
buffer_len
,
STUN_BINDING
);
stun_agent_init_request
(
agent
,
msg
,
buffer
,
buffer_len
,
STUN_BINDING
);
if
(
compatibility
==
STUN_USAGE_ICE_COMPATIBILITY_
ID
19
)
{
if
(
compatibility
==
STUN_USAGE_ICE_COMPATIBILITY_
DRAFT
19
)
{
if
(
cand_use
)
if
(
cand_use
)
{
{
val
=
stun_message_append_flag
(
msg
,
STUN_ATTRIBUTE_USE_CANDIDATE
);
val
=
stun_message_append_flag
(
msg
,
STUN_ATTRIBUTE_USE_CANDIDATE
);
...
...
stun/usages/ice.h
View file @
50fb51ff
...
@@ -48,7 +48,7 @@ extern "C" {
...
@@ -48,7 +48,7 @@ extern "C" {
# endif
# endif
typedef
enum
{
typedef
enum
{
STUN_USAGE_ICE_COMPATIBILITY_
ID
19
,
STUN_USAGE_ICE_COMPATIBILITY_
DRAFT
19
,
STUN_USAGE_ICE_COMPATIBILITY_GOOGLE
,
STUN_USAGE_ICE_COMPATIBILITY_GOOGLE
,
STUN_USAGE_ICE_COMPATIBILITY_MSN
,
STUN_USAGE_ICE_COMPATIBILITY_MSN
,
}
StunUsageIceCompatibility
;
}
StunUsageIceCompatibility
;
...
...
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