diff options
author | dscho <dscho> | 2001-10-03 02:11:59 +0000 |
---|---|---|
committer | dscho <dscho> | 2001-10-03 02:11:59 +0000 |
commit | 05c8f2d4840e8e4d0166b176b8c88bfdfffcce91 (patch) | |
tree | 256410bdcf6ad8343f914b146bb67f47ae90d11f /main.c | |
parent | 130ae151d118378e5765713581283728fdfb3e20 (diff) | |
download | libtdevnc-05c8f2d4840e8e4d0166b176b8c88bfdfffcce91.tar.gz libtdevnc-05c8f2d4840e8e4d0166b176b8c88bfdfffcce91.zip |
upgraded to TridiaVNC 1.2.1
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -48,7 +48,7 @@ rfbLog(char *format, ...) char buf[256]; time_t log_clock; - IF_PTHREADS(pthread_mutex_lock(&logMutex)); + IF_PTHREADS(LOCK(logMutex)); va_start(args, format); time(&log_clock); @@ -59,7 +59,7 @@ rfbLog(char *format, ...) fflush(stderr); va_end(args); - IF_PTHREADS(pthread_mutex_unlock(&logMutex)); + IF_PTHREADS(UNLOCK(logMutex)); } void rfbLogPerror(char *str) @@ -314,6 +314,7 @@ rfbScreenInfoPtr rfbGetScreen(int argc,char** argv, if(width&3) fprintf(stderr,"WARNING: Width (%d) is not a multiple of 4. VncViewer has problems with that.\n",width); + rfbScreen->rfbClientHead=0; rfbScreen->rfbPort=5900; rfbScreen->socketInitDone=FALSE; @@ -323,6 +324,7 @@ rfbScreenInfoPtr rfbGetScreen(int argc,char** argv, rfbScreen->udpSock=-1; rfbScreen->udpSockConnected=FALSE; rfbScreen->udpPort=0; + rfbScreen->udpClient=0; rfbScreen->maxFd=0; rfbScreen->rfbListenSock=-1; @@ -419,6 +421,7 @@ void rfbInitServer(rfbScreenInfoPtr rfbScreen) { rfbInitSockets(rfbScreen); httpInitSockets(rfbScreen); + INIT_MUTEX(logMutex); } void @@ -451,7 +454,6 @@ void rfbRunEventLoop(rfbScreenInfoPtr rfbScreen, long usec, Bool runInBackground #ifdef HAVE_PTHREADS pthread_t listener_thread; - pthread_mutex_init(&logMutex, NULL); pthread_create(&listener_thread, NULL, listenerRun, rfbScreen); return; #else |