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
37d6d00f
Commit
37d6d00f
authored
Oct 28, 2018
by
Olivier Crête
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
udp-turn: Factor our SendRequest destruction
parent
a4b82ce4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
27 deletions
+15
-27
socket/udp-turn.c
socket/udp-turn.c
+15
-27
No files found.
socket/udp-turn.c
View file @
37d6d00f
...
...
@@ -148,6 +148,17 @@ static gboolean priv_add_channel_binding (UdpTurnPriv *priv,
static
gboolean
priv_forget_send_request_agent_locked
(
gpointer
pointer
);
static
void
priv_clear_permissions
(
UdpTurnPriv
*
priv
);
static
void
send_request_free
(
SendRequest
*
r
)
{
g_source_destroy
(
r
->
source
);
g_source_unref
(
r
->
source
);
stun_agent_forget_transaction
(
&
r
->
priv
->
agent
,
r
->
id
);
g_slice_free
(
SendRequest
,
r
);
}
static
guint
priv_nice_address_hash
(
gconstpointer
data
)
{
...
...
@@ -291,18 +302,7 @@ socket_close (NiceSocket *sock)
}
for
(
i
=
g_queue_peek_head_link
(
priv
->
send_requests
);
i
;
i
=
i
->
next
)
{
SendRequest
*
r
=
i
->
data
;
g_source_destroy
(
r
->
source
);
g_source_unref
(
r
->
source
);
r
->
source
=
NULL
;
stun_agent_forget_transaction
(
&
priv
->
agent
,
r
->
id
);
g_slice_free
(
SendRequest
,
r
);
}
g_queue_free
(
priv
->
send_requests
);
g_queue_free_full
(
priv
->
send_requests
,
(
GDestroyNotify
)
send_request_free
);
priv_clear_permissions
(
priv
);
g_list_free_full
(
priv
->
sent_permissions
,
(
GDestroyNotify
)
nice_address_free
);
...
...
@@ -983,17 +983,10 @@ priv_forget_send_request_agent_locked (gpointer pointer)
{
SendRequest
*
req
=
pointer
;
stun_agent_forget_transaction
(
&
req
->
priv
->
agent
,
req
->
id
);
send_request_free
(
req
);
g_queue_remove
(
req
->
priv
->
send_requests
,
req
);
g_source_destroy
(
req
->
source
);
g_source_unref
(
req
->
source
);
req
->
source
=
NULL
;
g_slice_free
(
SendRequest
,
req
);
return
FALSE
;
return
G_SOURCE_REMOVE
;
}
static
gboolean
...
...
@@ -1216,13 +1209,8 @@ nice_udp_turn_socket_parse_recv (NiceSocket *sock, NiceSocket **from_sock,
}
if
(
req
)
{
g_source_destroy
(
req
->
source
);
g_source_unref
(
req
->
source
);
req
->
source
=
NULL
;
g_queue_remove
(
priv
->
send_requests
,
req
);
g_slice_free
(
SendRequest
,
req
);
send_request_free
(
req
);
}
if
(
priv
->
compatibility
==
NICE_TURN_SOCKET_COMPATIBILITY_GOOGLE
)
{
...
...
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