aboutsummaryrefslogtreecommitdiffstats
path: root/apps/mainloop.c
diff options
context:
space:
mode:
authorjames <>2008-02-20 20:16:07 +0000
committerjames <>2008-02-20 20:16:07 +0000
commit72bf4c274834b91ce599ae272fb5159913b8e033 (patch)
treee84fcc5c7fc3dfa04ddb840f04afa5e15233e739 /apps/mainloop.c
parent8e2bb9b2970ecb7ca3919b074e4474b878bd02bb (diff)
downloadsympathy-72bf4c274834b91ce599ae272fb5159913b8e033.tar.gz
sympathy-72bf4c274834b91ce599ae272fb5159913b8e033.tar.bz2
sympathy-72bf4c274834b91ce599ae272fb5159913b8e033.zip
*** empty log message ***
Diffstat (limited to 'apps/mainloop.c')
-rw-r--r--apps/mainloop.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/mainloop.c b/apps/mainloop.c
index 3c7d01d..fd8f982 100644
--- a/apps/mainloop.c
+++ b/apps/mainloop.c
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
/*
* $Log$
+ * Revision 1.7 2008/02/20 20:16:07 james
+ * *** empty log message ***
+ *
* Revision 1.6 2008/02/20 19:44:37 james
* @@
*
@@ -419,7 +422,7 @@ mainloop (TTY * tty, Socket * server_socket, Socket * client_socket,
if (client_socket)
socket_pre_select (client_socket, &rfds, &wfds);
- if (ansi)
+ if (ansi && ansi->terminal)
tty_pre_select (ansi->terminal, &rfds, &wfds);
select (FD_SETSIZE, &rfds, &wfds, NULL, &tv);
@@ -470,15 +473,18 @@ mainloop (TTY * tty, Socket * server_socket, Socket * client_socket,
/*any data from the server */
if (client_socket)
{
+ int one_shot;
if (socket_post_select (client_socket, &rfds, &wfds))
break;
while (client_socket->msg)
{
if (msg_from_server (ansi,client_socket->msg, &c))
- break;
+ one_shot++;
+
socket_consume_msg (client_socket);
}
+ if (one_shot) break;
}