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
9d27ed2d
Commit
9d27ed2d
authored
Feb 08, 2007
by
Dafydd Harries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove nice_agent_recv
darcs-hash:20070208153623-c9803-e44549d1eddb5b5a42695ad2a1130e315a0c372d.gz
parent
40d68516
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
46 deletions
+21
-46
agent/agent.c
agent/agent.c
+2
-29
agent/agent.h
agent/agent.h
+0
-5
agent/test-recv.c
agent/test-recv.c
+15
-7
agent/test-send.c
agent/test-send.c
+1
-1
agent/test-stun.c
agent/test-stun.c
+3
-3
nice/libnice.symbols
nice/libnice.symbols
+0
-1
No files found.
agent/agent.c
View file @
9d27ed2d
...
...
@@ -308,6 +308,7 @@ nice_agent_add_remote_candidate (
}
#if 0
static NiceCandidate *
_local_candidate_lookup (NiceAgent *agent, guint candidate_id)
{
...
...
@@ -323,6 +324,7 @@ _local_candidate_lookup (NiceAgent *agent, guint candidate_id)
return NULL;
}
#endif
static
NiceCandidate
*
...
...
@@ -688,35 +690,6 @@ _nice_agent_candidate_recv (
}
/**
* nice_agent_recv:
* @agent: The agent to notify
* @candidate_id: The ID of the candidate that has data waiting on its socket
*
* Tell the agent to try receiving a packet on @candidate's socket. This is
* useful for integrating the agent into a select()-loop. This function will
* block if the socket is blocking.
**/
void
nice_agent_recv
(
NiceAgent
*
agent
,
guint
candidate_id
)
{
NiceCandidate
*
candidate
;
/* XXX: this is a probably a good place to start optimizing, as it gets
* called once for each packet recieved
*/
candidate
=
_local_candidate_lookup
(
agent
,
candidate_id
);
if
(
candidate
==
NULL
)
return
;
_nice_agent_candidate_recv
(
agent
,
candidate
);
}
/**
* nice_agent_component_recv:
* @agent: a NiceAgent
...
...
agent/agent.h
View file @
9d27ed2d
...
...
@@ -59,11 +59,6 @@ nice_agent_add_remote_candidate (
gchar
*
username
,
gchar
*
password
);
void
nice_agent_recv
(
NiceAgent
*
agent
,
guint
candidate_id
);
guint
nice_agent_component_recv
(
NiceAgent
*
agent
,
...
...
agent/test-recv.c
View file @
9d27ed2d
...
...
@@ -28,9 +28,7 @@ main (void)
{
NiceAgent
*
agent
;
NiceAddress
addr
=
{
0
,};
NiceCandidate
*
candidate
;
NiceUDPSocketFactory
factory
;
NiceUDPSocket
*
sock
;
nice_udp_fake_socket_factory_init
(
&
factory
);
...
...
@@ -42,11 +40,21 @@ main (void)
g_assert
(
agent
->
local_candidates
!=
NULL
);
/* recieve an RTP packet */
{
NiceCandidate
*
candidate
;
NiceUDPSocket
*
sock
;
guint
len
;
gchar
buf
[
1024
];
candidate
=
agent
->
local_candidates
->
data
;
sock
=
&
(
candidate
->
sock
);
nice_udp_fake_socket_push_recv
(
sock
,
&
addr
,
7
,
"
\x80
lalala"
);
nice_agent_recv
(
agent
,
candidate
->
id
);
g_assert
(
cb_called
==
TRUE
);
len
=
nice_agent_component_recv
(
agent
,
candidate
->
stream_id
,
candidate
->
component_id
,
1024
,
buf
);
g_assert
(
len
==
7
);
g_assert
(
0
==
strncmp
(
buf
,
"
\x80
lalala"
,
7
));
}
/* clean up */
nice_agent_free
(
agent
);
...
...
agent/test-send.c
View file @
9d27ed2d
...
...
@@ -43,7 +43,7 @@ send_connectivity_check (
stun_message_free
(
msg
);
}
nice_agent_
recv
(
agent
,
1
);
nice_agent_
poll_read
(
agent
,
NULL
);
{
StunMessage
*
msg
;
...
...
agent/test-stun.c
View file @
9d27ed2d
...
...
@@ -48,7 +48,7 @@ test_stun_no_password (
}
/* tell the agent there's a packet waiting */
nice_agent_
recv
(
agent
,
candidate
->
id
);
nice_agent_
poll_read
(
agent
,
NULL
);
/* error response should have been sent */
len
=
nice_udp_fake_socket_pop_send
(
sock
,
&
to
,
sizeof
(
buf
)
/
sizeof
(
gchar
),
...
...
@@ -104,7 +104,7 @@ test_stun_invalid_password (
}
/* tell the agent there's a packet waiting */
nice_agent_
recv
(
agent
,
candidate
->
id
);
nice_agent_
poll_read
(
agent
,
NULL
);
/* error should have been sent */
len
=
nice_udp_fake_socket_pop_send
(
sock
,
&
to
,
sizeof
(
buf
)
/
sizeof
(
gchar
),
...
...
@@ -182,7 +182,7 @@ test_stun_valid_password (
g_free
(
username
);
/* tell the agent there's a packet waiting */
nice_agent_
recv
(
agent
,
candidate
->
id
);
nice_agent_
poll_read
(
agent
,
NULL
);
/* compare sent packet to expected */
len
=
nice_udp_fake_socket_pop_send
(
sock
,
&
to
,
...
...
nice/libnice.symbols
View file @
9d27ed2d
...
...
@@ -14,7 +14,6 @@ T nice_agent_free
T nice_agent_get_local_candidates
T nice_agent_new
T nice_agent_poll_read
T nice_agent_recv
T nice_agent_send
T nice_candidate_free
T nice_candidate_ice_priority
...
...
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