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
3be5b428
Commit
3be5b428
authored
Dec 16, 2013
by
Philip Withnall
Committed by
Olivier Crête
Jan 31, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
agent: Eliminate redundant arguments from component_emit_io_callback()
parent
68a9632e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
17 deletions
+16
-17
agent/agent.c
agent/agent.c
+2
-8
agent/component.c
agent/component.c
+12
-7
agent/component.h
agent/component.h
+2
-2
No files found.
agent/agent.c
View file @
3be5b428
...
@@ -1049,10 +1049,7 @@ pseudo_tcp_socket_readable (PseudoTcpSocket *sock, gpointer user_data)
...
@@ -1049,10 +1049,7 @@ pseudo_tcp_socket_readable (PseudoTcpSocket *sock, gpointer user_data)
len
=
0
;
len
=
0
;
if
(
len
>
0
)
{
if
(
len
>
0
)
{
gint
sid
=
stream
->
id
;
component_emit_io_callback
(
component
,
buf
,
len
);
gint
cid
=
component
->
id
;
component_emit_io_callback
(
component
,
agent
,
sid
,
cid
,
buf
,
len
);
if
(
sock
==
NULL
)
{
if
(
sock
==
NULL
)
{
nice_debug
(
"PseudoTCP socket got destroyed in readable callback!"
);
nice_debug
(
"PseudoTCP socket got destroyed in readable callback!"
);
break
;
break
;
...
@@ -2700,10 +2697,7 @@ nice_agent_g_source_cb (
...
@@ -2700,10 +2697,7 @@ nice_agent_g_source_cb (
ctx
->
agent
,
ctx
->
socket
);
ctx
->
agent
,
ctx
->
socket
);
component_detach_socket_source
(
component
,
ctx
->
socket
);
component_detach_socket_source
(
component
,
ctx
->
socket
);
}
else
if
(
len
>
0
&&
component
->
io_callback
)
{
}
else
if
(
len
>
0
&&
component
->
io_callback
)
{
gint
sid
=
stream
->
id
;
component_emit_io_callback
(
component
,
buf
,
len
);
gint
cid
=
component
->
id
;
component_emit_io_callback
(
component
,
agent
,
sid
,
cid
,
buf
,
len
);
}
}
agent_unlock
();
agent_unlock
();
...
...
agent/component.c
View file @
3be5b428
...
@@ -473,24 +473,29 @@ component_set_io_callback (Component *component, NiceAgentRecvFunc func,
...
@@ -473,24 +473,29 @@ component_set_io_callback (Component *component, NiceAgentRecvFunc func,
/* This must be called with the agent lock *held*. */
/* This must be called with the agent lock *held*. */
void
void
component_emit_io_callback
(
Component
*
component
,
NiceAgent
*
agent
,
component_emit_io_callback
(
Component
*
component
,
gint
stream_id
,
gint
component_id
,
const
guint8
*
buf
,
gsize
buf_len
)
const
guint8
*
buf
,
gsize
buf_len
)
{
{
NiceAgent
*
agent
;
guint
stream_id
,
component_id
;
NiceAgentRecvFunc
io_callback
;
NiceAgentRecvFunc
io_callback
;
gpointer
io_user_data
;
gpointer
io_user_data
;
g_assert
(
component
!=
NULL
);
g_assert
(
component
!=
NULL
);
g_assert
(
NICE_IS_AGENT
(
agent
));
g_assert
(
stream_id
>
0
);
g_assert
(
component_id
>
0
);
g_assert
(
buf
!=
NULL
);
g_assert
(
buf
!=
NULL
);
g_assert
(
buf_len
>
0
);
g_assert
(
buf_len
>
0
);
g_assert
(
component
->
io_callback
!=
NULL
);
agent
=
component
->
agent
;
stream_id
=
component
->
stream
->
id
;
component_id
=
component
->
id
;
io_callback
=
component
->
io_callback
;
io_callback
=
component
->
io_callback
;
io_user_data
=
component
->
io_user_data
;
io_user_data
=
component
->
io_user_data
;
g_assert
(
NICE_IS_AGENT
(
agent
));
g_assert
(
stream_id
>
0
);
g_assert
(
component_id
>
0
);
g_assert
(
io_callback
!=
NULL
);
agent_unlock
();
agent_unlock
();
io_callback
(
agent
,
stream_id
,
component_id
,
io_callback
(
agent
,
stream_id
,
component_id
,
...
...
agent/component.h
View file @
3be5b428
...
@@ -174,8 +174,8 @@ void
...
@@ -174,8 +174,8 @@ void
component_set_io_callback
(
Component
*
component
,
NiceAgentRecvFunc
func
,
component_set_io_callback
(
Component
*
component
,
NiceAgentRecvFunc
func
,
gpointer
user_data
,
GMainContext
*
context
);
gpointer
user_data
,
GMainContext
*
context
);
void
void
component_emit_io_callback
(
Component
*
component
,
NiceAgent
*
agent
,
component_emit_io_callback
(
Component
*
component
,
gint
stream_id
,
gint
component_id
,
const
guint8
*
buf
,
gsize
buf_len
);
const
guint8
*
buf
,
gsize
buf_len
);
G_END_DECLS
G_END_DECLS
...
...
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