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
a0950234
Commit
a0950234
authored
Oct 23, 2008
by
Youness Alaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't forget to unref the g_io_channel
parent
6f460fd3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
agent/agent.c
agent/agent.c
+6
-2
No files found.
agent/agent.c
View file @
a0950234
...
...
@@ -1615,6 +1615,7 @@ typedef struct _IOCtx IOCtx;
struct
_IOCtx
{
GIOChannel
*
channel
;
NiceAgent
*
agent
;
Stream
*
stream
;
Component
*
component
;
...
...
@@ -1627,7 +1628,8 @@ io_ctx_new (
NiceAgent
*
agent
,
Stream
*
stream
,
Component
*
component
,
NiceSocket
*
socket
)
NiceSocket
*
socket
,
GIOChannel
*
channel
)
{
IOCtx
*
ctx
;
...
...
@@ -1637,6 +1639,7 @@ io_ctx_new (
ctx
->
stream
=
stream
;
ctx
->
component
=
component
;
ctx
->
socket
=
socket
;
ctx
->
channel
=
channel
;
}
return
ctx
;
}
...
...
@@ -1645,6 +1648,7 @@ io_ctx_new (
static
void
io_ctx_free
(
IOCtx
*
ctx
)
{
g_io_channel_unref
(
ctx
->
channel
);
g_slice_free
(
IOCtx
,
ctx
);
}
...
...
@@ -1701,7 +1705,7 @@ priv_attach_stream_component_socket (NiceAgent *agent,
/* note: without G_IO_ERR the glib mainloop goes into
* busyloop if errors are encountered */
source
=
g_io_create_watch
(
io
,
G_IO_IN
|
G_IO_ERR
);
ctx
=
io_ctx_new
(
agent
,
stream
,
component
,
socket
);
ctx
=
io_ctx_new
(
agent
,
stream
,
component
,
socket
,
io
);
g_source_set_callback
(
source
,
(
GSourceFunc
)
nice_agent_g_source_cb
,
ctx
,
(
GDestroyNotify
)
io_ctx_free
);
nice_debug
(
"Agent %p : Attach source %p (stream %u)."
,
agent
,
source
,
stream
->
id
);
...
...
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