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
be963a98
Commit
be963a98
authored
Dec 10, 2008
by
Youness Alaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
free the to_be_sent queue if we get closed and the queue is not empty
parent
88c849be
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
socket/pseudossl.c
socket/pseudossl.c
+13
-1
No files found.
socket/pseudossl.c
View file @
be963a98
...
...
@@ -102,6 +102,7 @@ static gboolean socket_is_reliable (NiceSocket *sock);
static
void
add_to_be_sent
(
NiceSocket
*
sock
,
const
NiceAddress
*
to
,
const
gchar
*
buf
,
guint
len
);
static
void
free_to_be_sent
(
struct
to_be_sent
*
tbs
);
NiceSocket
*
...
...
@@ -138,6 +139,9 @@ socket_close (NiceSocket *sock)
if
(
priv
->
base_socket
)
nice_socket_free
(
priv
->
base_socket
);
g_queue_foreach
(
&
priv
->
send_queue
,
(
GFunc
)
free_to_be_sent
,
NULL
);
g_queue_clear
(
&
priv
->
send_queue
);
g_slice_free
(
PseudoSSLPriv
,
sock
->
priv
);
}
...
...
@@ -216,7 +220,15 @@ add_to_be_sent (NiceSocket *sock, const NiceAddress *to,
tbs
=
g_slice_new0
(
struct
to_be_sent
);
tbs
->
buf
=
g_memdup
(
buf
,
len
);
tbs
->
length
=
len
;
if
(
to
)
tbs
->
to
=
*
to
;
g_queue_push_tail
(
&
priv
->
send_queue
,
tbs
);
}
static
void
free_to_be_sent
(
struct
to_be_sent
*
tbs
)
{
g_free
(
tbs
->
buf
);
g_slice_free
(
struct
to_be_sent
,
tbs
);
}
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