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
10d4756b
Commit
10d4756b
authored
Jul 30, 2008
by
Youness Alaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix stun discovery timeout
parent
be44f5c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
agent/discovery.c
agent/discovery.c
+14
-6
No files found.
agent/discovery.c
View file @
10d4756b
...
@@ -530,7 +530,6 @@ static gboolean priv_discovery_tick_unlocked (gpointer pointer)
...
@@ -530,7 +530,6 @@ static gboolean priv_discovery_tick_unlocked (gpointer pointer)
buffer_len
=
stun_usage_bind_create
(
&
agent
->
stun_agent
,
buffer_len
=
stun_usage_bind_create
(
&
agent
->
stun_agent
,
&
cand
->
stun_message
,
cand
->
stun_buffer
,
sizeof
(
cand
->
stun_buffer
));
&
cand
->
stun_message
,
cand
->
stun_buffer
,
sizeof
(
cand
->
stun_buffer
));
if
(
buffer_len
>
0
)
{
if
(
buffer_len
>
0
)
{
stun_timer_start
(
&
cand
->
timer
);
stun_timer_start
(
&
cand
->
timer
);
...
@@ -555,7 +554,7 @@ static gboolean priv_discovery_tick_unlocked (gpointer pointer)
...
@@ -555,7 +554,7 @@ static gboolean priv_discovery_tick_unlocked (gpointer pointer)
++
not_done
;
/* note: new discovery scheduled */
++
not_done
;
/* note: new discovery scheduled */
}
}
if
(
cand
->
done
!=
TRUE
)
{
if
(
cand
->
done
!=
TRUE
)
{
GTimeVal
now
;
GTimeVal
now
;
...
@@ -566,13 +565,14 @@ static gboolean priv_discovery_tick_unlocked (gpointer pointer)
...
@@ -566,13 +565,14 @@ static gboolean priv_discovery_tick_unlocked (gpointer pointer)
cand
->
done
=
TRUE
;
cand
->
done
=
TRUE
;
}
}
else
if
(
priv_timer_expired
(
&
cand
->
next_tick
,
&
now
))
{
else
if
(
priv_timer_expired
(
&
cand
->
next_tick
,
&
now
))
{
switch
(
stun_timer_refresh
(
&
cand
->
timer
))
{
int
timeout
=
stun_timer_refresh
(
&
cand
->
timer
);
switch
(
timeout
)
{
case
-
1
:
case
-
1
:
/* case: error, abort processing */
/* case: error, abort processing */
cand
->
done
=
TRUE
;
cand
->
done
=
TRUE
;
cand
->
stun_message
.
buffer
=
NULL
;
cand
->
stun_message
.
buffer
=
NULL
;
cand
->
stun_message
.
buffer_len
=
0
;
cand
->
stun_message
.
buffer_len
=
0
;
g_debug
(
"Agent %p :
Error with stun_bind_elapse()
, aborting discovery item."
,
agent
);
g_debug
(
"Agent %p :
bind discovery timed out
, aborting discovery item."
,
agent
);
break
;
break
;
case
0
:
case
0
:
{
{
...
@@ -596,14 +596,22 @@ static gboolean priv_discovery_tick_unlocked (gpointer pointer)
...
@@ -596,14 +596,22 @@ static gboolean priv_discovery_tick_unlocked (gpointer pointer)
cand
->
next_tick
=
now
;
cand
->
next_tick
=
now
;
g_time_val_add
(
&
cand
->
next_tick
,
timeout
*
1000
);
g_time_val_add
(
&
cand
->
next_tick
,
timeout
*
1000
);
++
not_done
;
/* note: retry later */
break
;
}
default:
{
cand
->
next_tick
=
now
;
g_time_val_add
(
&
cand
->
next_tick
,
timeout
*
1000
);
++
not_done
;
/* note: retry later */
++
not_done
;
/* note: retry later */
break
;
break
;
}
}
}
}
}
}
else
{
else
++
not_done
;
/* note: discovery not expired yet */
++
not_done
;
/* note: discovery not expired yet */
}
}
}
}
}
...
...
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