Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/usermode/usermode Add extra debugging info for the ...



details:   https://anonhg.NetBSD.org/src/rev/76d24cf1f468
branches:  trunk
changeset: 772443:76d24cf1f468
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Wed Jan 04 13:31:30 2012 +0000

description:
Add extra debugging info for the vncfb code

diffstat:

 sys/arch/usermode/usermode/thunk.c |  18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diffs (44 lines):

diff -r 62701bcf8b3b -r 76d24cf1f468 sys/arch/usermode/usermode/thunk.c
--- a/sys/arch/usermode/usermode/thunk.c        Wed Jan 04 11:56:58 2012 +0000
+++ b/sys/arch/usermode/usermode/thunk.c        Wed Jan 04 13:31:30 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: thunk.c,v 1.72 2012/01/03 12:05:00 reinoud Exp $ */
+/* $NetBSD: thunk.c,v 1.73 2012/01/04 13:31:30 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2011 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #ifdef __NetBSD__
-__RCSID("$NetBSD: thunk.c,v 1.72 2012/01/03 12:05:00 reinoud Exp $");
+__RCSID("$NetBSD: thunk.c,v 1.73 2012/01/04 13:31:30 reinoud Exp $");
 #endif
 
 #include <sys/types.h>
@@ -1157,12 +1157,24 @@
                socklen_t sinlen;
                int flags;
 
+#ifdef RFB_DEBUG
+               fprintf(stdout, "rfb: poll connection\n");
+#endif
+
                /* poll for connections */
                fds[0].fd = rfb->sockfd;
                fds[0].events = POLLIN;
                fds[0].revents = 0;
-               if (poll(fds, __arraycount(fds), 0) != 1)
+               if (poll(fds, __arraycount(fds), 0) != 1) {
+#ifdef RFB_DEBUG
+                       fprintf(stdout, "rfb: NO connection\n");
+#endif
                        return -1;
+               }
+
+#ifdef RFB_DEBUG
+               fprintf(stdout, "rfb: try accept\n");
+#endif
 
                sinlen = sizeof(sin);
                rfb->clientfd = accept(rfb->sockfd, (struct sockaddr *)&sin,



Home | Main Index | Thread Index | Old Index