Commit d992f1df authored by Dafydd Harries's avatar Dafydd Harries

pass in correct data to recv callback

darcs-hash:20070212154510-c9803-8041a0af0f20f9593ba0d83bd3aee9c25eda7a15.gz
parent 73660fe6
...@@ -855,7 +855,7 @@ nice_agent_poll_read ( ...@@ -855,7 +855,7 @@ nice_agent_poll_read (
if (len && func != NULL) if (len && func != NULL)
func (agent, stream->id, candidate->component_id, len, buf, func (agent, stream->id, candidate->component_id, len, buf,
stream->handle_recv_data); data);
} }
} }
} }
......
...@@ -16,11 +16,13 @@ handle_recv ( ...@@ -16,11 +16,13 @@ handle_recv (
gchar *buf, gchar *buf,
gpointer data) gpointer data)
{ {
g_assert (agent != NULL);
g_assert (cb_called == FALSE); g_assert (cb_called == FALSE);
g_assert (stream_id == 1); g_assert (stream_id == 1);
g_assert (component_id == 1); g_assert (component_id == 1);
g_assert (len == 7); g_assert (len == 7);
g_assert (0 == strncmp (buf, "\x80lalala", 7)); g_assert (0 == strncmp (buf, "\x80lalala", 7));
g_assert (GPOINTER_TO_UINT (data) == 42);
cb_called = TRUE; cb_called = TRUE;
} }
...@@ -79,7 +81,8 @@ main (void) ...@@ -79,7 +81,8 @@ main (void)
/* poll again */ /* poll again */
readable = nice_agent_poll_read (agent, fds, handle_recv, NULL); readable = nice_agent_poll_read (agent, fds, handle_recv,
GUINT_TO_POINTER (42));
g_assert (cb_called == TRUE); g_assert (cb_called == TRUE);
g_assert (readable == NULL); g_assert (readable == NULL);
......
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