Removed the check for IO condition in socket_in_event [#23]
authorMikael Hallendal <micke@imendio.com>
Wed, 29 Oct 2008 17:54:25 +0100
changeset 554 df52d7a1a9af
parent 553 876d92399bbb
child 558 e5b7f24779c9
child 559 6602623168cd
Removed the check for IO condition in socket_in_event [#23] A simplified version of the fix for [#23] since socket will never be set in blocking mode here.
loudmouth/lm-old-socket.c
--- a/loudmouth/lm-old-socket.c	Wed Oct 29 17:52:22 2008 +0100
+++ b/loudmouth/lm-old-socket.c	Wed Oct 29 17:54:25 2008 +0100
@@ -254,8 +254,8 @@
         return FALSE;
     }
 
-    while ((condition & G_IO_IN) && socket_read_incoming (socket, buf, IN_BUFFER_SIZE, 
-                                                          &bytes_read, &hangup, &reason)) {
+    while (socket_read_incoming (socket, buf, IN_BUFFER_SIZE, 
+                                 &bytes_read, &hangup, &reason)) {
         
         g_log (LM_LOG_DOMAIN, LM_LOG_LEVEL_NET, "\nRECV [%d]:\n", 
                (int)bytes_read);
@@ -270,8 +270,6 @@
         (socket->data_func) (socket, buf, socket->user_data);
 
         read_anything = TRUE;
-
-        condition = g_io_channel_get_buffer_condition (socket->io_channel);
     }
 
     /* If we have read something, delay the hangup so that the data can be