Commit 2935b889 authored by Dafydd Harries's avatar Dafydd Harries
Browse files

add function for retrieving list of local candidates

darcs-hash:20070129151924-c9803-59ee83484399a76502a5e272b5738b5b3057dfae.gz
parent 25499f84
......@@ -445,6 +445,12 @@ ice_agent_set_stun_server (Address *addr, guint16 port)
}
*/
const GSList *
ice_agent_get_local_candidates (
Agent *agent)
{
return agent->local_candidates;
}
void
ice_agent_free (Agent *agent)
......
......@@ -91,6 +91,9 @@ void
ice_agent_recv (
Agent *agent,
guint candidate_id);
const GSList *
ice_agent_get_local_candidates (
Agent *agent);
#endif /* _AGENT_H */
......@@ -91,8 +91,9 @@ handle_connection (guint fileno, const struct sockaddr_in *sin, gpointer data)
sockets = g_slist_append (sockets, sock);
/* send first local candidate to remote end */
candidate_str = candidate_to_string (
(Candidate *) agent->local_candidates->data);
(Candidate *) ice_agent_get_local_candidates (agent)->data);
send (fileno, candidate_str, strlen (candidate_str), 0);
send (fileno, "\n", 1, 0);
g_free (candidate_str);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment