Module Name:    src
Committed By:   reinoud
Date:           Sat Dec 31 12:57:12 UTC 2011

Modified Files:
        src/sys/arch/usermode/usermode: thunk.c

Log Message:
Move the thunk_rfb_send_pending() up to where it belonged. It could disconnect
AND event could be NULL while it still would need to send... i.e. the barrier
in vncfbcopyrows()


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/usermode/usermode/thunk.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/usermode/usermode/thunk.c
diff -u src/sys/arch/usermode/usermode/thunk.c:1.69 src/sys/arch/usermode/usermode/thunk.c:1.70
--- src/sys/arch/usermode/usermode/thunk.c:1.69	Sat Dec 31 12:38:56 2011
+++ src/sys/arch/usermode/usermode/thunk.c	Sat Dec 31 12:57:12 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: thunk.c,v 1.69 2011/12/31 12:38:56 reinoud Exp $ */
+/* $NetBSD: thunk.c,v 1.70 2011/12/31 12:57:12 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2011 Jared D. McNeill <jmcne...@invisible.ca>
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #ifdef __NetBSD__
-__RCSID("$NetBSD: thunk.c,v 1.69 2011/12/31 12:38:56 reinoud Exp $");
+__RCSID("$NetBSD: thunk.c,v 1.70 2011/12/31 12:57:12 reinoud Exp $");
 #endif
 
 #include <sys/types.h>
@@ -1181,14 +1181,14 @@ thunk_rfb_poll(thunk_rfb_t *rfb, thunk_r
 		thunk_rfb_update(rfb, 0, 0, rfb->width, rfb->height);
 	}
 
+	thunk_rfb_send_pending(rfb);
+
 	if (rfb->clientfd == -1)
 		return -1;
 
 	if (event == NULL)
 		return 0;
 
-	thunk_rfb_send_pending(rfb);
-
 	if (rfb->schedule_bell) {
 		uint8_t msg_type = 2;	/* bell */
 		safe_send(rfb->clientfd, &msg_type, sizeof(msg_type));

Reply via email to