pseudotcp: Also accept NiceInputMessage array with a single message
authorOlivier Crête <olivier.crete@collabora.com>
Thu, 27 Mar 2014 21:51:03 +0000 (17:51 -0400)
committerOlivier Crête <olivier.crete@collabora.com>
Thu, 27 Mar 2014 22:05:41 +0000 (18:05 -0400)
agent/pseudotcp.c

index 8962ffc..013b666 100644 (file)
@@ -908,6 +908,12 @@ pseudo_tcp_socket_notify_message (PseudoTcpSocket *self,
 {
   gboolean retval;
 
+  g_assert_cmpuint (message->n_buffers, >, 0);
+
+  if (message->n_buffers == 1)
+    return pseudo_tcp_socket_notify_packet (self, message->buffers[0].buffer,
+        message->buffers[0].size);
+
   g_assert_cmpuint (message->n_buffers, ==, 2);
   g_assert_cmpuint (message->buffers[0].size, ==, HEADER_SIZE);