Module Name: src Committed By: reinoud Date: Wed Jan 4 13:31:30 UTC 2012
Modified Files: src/sys/arch/usermode/usermode: thunk.c Log Message: Add extra debugging info for the vncfb code To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 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.72 src/sys/arch/usermode/usermode/thunk.c:1.73 --- src/sys/arch/usermode/usermode/thunk.c:1.72 Tue Jan 3 12:05:00 2012 +++ src/sys/arch/usermode/usermode/thunk.c Wed Jan 4 13:31:30 2012 @@ -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 <jmcne...@invisible.ca> @@ -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 @@ thunk_rfb_poll(thunk_rfb_t *rfb, thunk_r 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,