else
g_queue_push_tail (send_queue, tbs);
- if (io_source && gsock && context && cb && *io_source == NULL) {
- *io_source = g_socket_create_source(gsock, G_IO_OUT, NULL);
- g_source_set_callback (*io_source, (GSourceFunc) G_CALLBACK (cb), user_data, NULL);
- g_source_attach (*io_source, context);
- }
-
/* Move the data into the buffer. */
for (j = 0;
(message->n_buffers >= 0 && j < (guint) message->n_buffers) ||
else
message_offset = 0;
}
+
+ if (io_source && gsock && context && cb && *io_source == NULL) {
+ *io_source = g_socket_create_source(gsock, G_IO_OUT, NULL);
+ g_source_set_callback (*io_source, (GSourceFunc) G_CALLBACK (cb), user_data, NULL);
+ g_source_attach (*io_source, context);
+ }
}
void nice_socket_flush_send_queue (NiceSocket *base_socket, GQueue *send_queue)