]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - windows/winplink.c
Add support in uxnet.c for Unix-domain listening sockets.
[PuTTY.git] / windows / winplink.c
index 0abed7ce31f682d0a597ccb490abe915d1f8c93f..5849e0d4a1b8e0caa20cd287949b2af92aafdf9c 100644 (file)
@@ -49,6 +49,15 @@ void modalfatalbox(char *p, ...)
     }
     cleanup_exit(1);
 }
+void nonfatal(char *p, ...)
+{
+    va_list ap;
+    fprintf(stderr, "ERROR: ");
+    va_start(ap, p);
+    vfprintf(stderr, p, ap);
+    va_end(ap);
+    fputc('\n', stderr);
+}
 void connection_fatal(void *frontend, char *p, ...)
 {
     va_list ap;
@@ -635,13 +644,15 @@ int main(int argc, char **argv)
            sending = TRUE;
        }
 
-       if (run_timers(now, &next)) {
-       then = now;
-       now = GETTICKCOUNT();
-       if (now - then > next - then)
-           ticks = 0;
-       else
-           ticks = next - now;
+        if (toplevel_callback_pending()) {
+            ticks = 0;
+        } else if (run_timers(now, &next)) {
+           then = now;
+           now = GETTICKCOUNT();
+           if (now - then > next - then)
+               ticks = 0;
+           else
+               ticks = next - now;
        } else {
            ticks = INFINITE;
        }
@@ -725,6 +736,8 @@ int main(int argc, char **argv)
            }
        }
 
+        run_toplevel_callbacks();
+
        if (n == WAIT_TIMEOUT) {
            now = next;
        } else {