Commit 6ad5b7c6 authored by Youness Alaoui's avatar Youness Alaoui
Browse files

Port agent tests to the new NiceSocket API

parent 35192613
......@@ -86,15 +86,13 @@ main (void)
g_main_loop_get_context (loop), recv_cb, GUINT_TO_POINTER (42));
{
NiceUDPSocket *sock;
NiceCandidate *candidate;
GSList *candidates;
candidates = nice_agent_get_local_candidates (agent, 1, 1);
candidate = candidates->data;
sock = candidate->sockptr;
nice_udp_socket_send (sock, &(candidate->addr), 6, "\x80hello");
nice_socket_send (candidate->sockptr, &(candidate->addr), 6, "\x80hello");
g_slist_free (candidates);
}
......
......@@ -44,7 +44,6 @@
#include <unistd.h>
#include <nice/nice.h>
#include "udp.h"
static gboolean cb_called = FALSE;
......@@ -73,7 +72,7 @@ main (void)
{
NiceAgent *agent;
NiceAddress addr;
NiceUDPSocket *sock;
NiceSocket *sock;
gint pipe_fds[2];
GSList *fds = NULL;
GSList *readable;
......@@ -132,7 +131,7 @@ main (void)
/* send fake data */
nice_udp_socket_send (sock, &addr, 7, "\x80lalala");
nice_socket_send (sock, &addr, 7, "\x80lalala");
/* poll again */
......
......@@ -41,7 +41,6 @@
#include <string.h>
#include "udp.h"
#include "agent.h"
int
......@@ -66,7 +65,6 @@ main (void)
{
NiceCandidate *candidate;
NiceUDPSocket *sock;
guint len;
gchar buf[1024];
GSList *candidates;
......@@ -74,8 +72,7 @@ main (void)
candidates = nice_agent_get_local_candidates (agent, stream_id, 1);
candidate = candidates->data;
g_slist_free (candidates);
sock = candidate->sockptr;
nice_udp_socket_send (sock, &candidate->addr, 7, "\x80lalala");
nice_socket_send (candidate->sockptr, &candidate->addr, 7, "\x80lalala");
len = nice_agent_recv (agent, stream_id,
candidate->component_id, 1024, buf);
g_assert (len == 7);
......
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