aboutsummaryrefslogtreecommitdiffstats
path: root/apps/mainloop.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/mainloop.c')
-rw-r--r--apps/mainloop.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/apps/mainloop.c b/apps/mainloop.c
index e266179..19c5759 100644
--- a/apps/mainloop.c
+++ b/apps/mainloop.c
@@ -11,6 +11,9 @@ static char rcsid[] =
/*
* $Log$
+ * Revision 1.25 2008/03/06 21:33:02 james
+ * *** empty log message ***
+ *
* Revision 1.24 2008/03/06 16:49:39 james
* *** empty log message ***
*
@@ -548,16 +551,18 @@ mainloop (Context * c, ANSI * ansi, Socket * server_socket,
/*any data from the server */
if (client_socket)
{
+ int err=0;
+
if (socket_post_select (client_socket, &rfds, &wfds))
break;
- while (client_socket->msg)
+ while (client_socket->msg && !err)
{
- if (msg_from_server (ansi, client_socket->msg, c))
- break;
-
+ err+=msg_from_server (ansi, client_socket->msg, c);
socket_consume_msg (client_socket);
}
+
+ if (err) break;
}