tFix for graphical server networking - vaccinewars - be a doctor and try to vaccinate the world
git clone git://src.adamsgaard.dk/vaccinewars
Log
Files
Refs
README
LICENSE
---
commit 11e6dfecc64bae48ddd4635abc3a1bac303ed157
parent e7c5a72ffa3792b51897276ec83f6c99434f7637
Author: Ben Webb 
Date:   Tue, 16 Oct 2001 20:26:45 +0000

Fix for graphical server networking


Diffstat:
  M src/serverside.c                    |       7 +++++--

1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/serverside.c b/src/serverside.c
t@@ -997,7 +997,8 @@ void ServerLoop() {
 #ifdef GUI_SERVER
 static GtkWidget *TextOutput;
 static gint ListenTag=0;
-static void SocketStatus(NetworkBuffer *NetBuf,gboolean Read,gboolean Write);
+static void SocketStatus(NetworkBuffer *NetBuf,gboolean Read,gboolean Write,
+                         gboolean CallNow);
 static void GuiSetTimeouts(void);
 static time_t NextTimeout=0;
 static guint TimeoutTag=0;
t@@ -1109,7 +1110,8 @@ static void GuiHandleSocket(gpointer data,gint socket,
    }
 }
 
-void SocketStatus(NetworkBuffer *NetBuf,gboolean Read,gboolean Write) {
+void SocketStatus(NetworkBuffer *NetBuf,gboolean Read,gboolean Write,
+                  gboolean CallNow) {
    if (NetBuf->InputTag) gdk_input_remove(NetBuf->InputTag);
    NetBuf->InputTag=0;
    if (Read || Write) {
t@@ -1118,6 +1120,7 @@ void SocketStatus(NetworkBuffer *NetBuf,gboolean Read,gboolean Write) {
                                      (Write ? GDK_INPUT_WRITE : 0),
                                      GuiHandleSocket,NetBuf->CallBackData);
    }
+   if (CallNow) GuiHandleSocket(NetBuf->CallBackData,NetBuf->fd,0);
 }
 
 void MetaSocketStatus(NetworkBuffer *NetBuf,gboolean Read,gboolean Write,