Commit 9b3163c0 authored by runge's avatar runge

logMutex needs to be initialized too; in rfbDefaultLog.

parent 57cf0cda
...@@ -38,6 +38,8 @@ ...@@ -38,6 +38,8 @@
#include <signal.h> #include <signal.h>
#include <time.h> #include <time.h>
static int extMutex_initialized = 0;
static int logMutex_initialized = 0;
#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD #ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
static MUTEX(logMutex); static MUTEX(logMutex);
static MUTEX(extMutex); static MUTEX(extMutex);
...@@ -61,7 +63,6 @@ void ...@@ -61,7 +63,6 @@ void
rfbRegisterProtocolExtension(rfbProtocolExtension* extension) rfbRegisterProtocolExtension(rfbProtocolExtension* extension)
{ {
rfbProtocolExtension* last; rfbProtocolExtension* last;
static int extMutex_initialized = 0;
if (! extMutex_initialized) { if (! extMutex_initialized) {
INIT_MUTEX(extMutex); INIT_MUTEX(extMutex);
...@@ -152,6 +153,11 @@ rfbDefaultLog(const char *format, ...) ...@@ -152,6 +153,11 @@ rfbDefaultLog(const char *format, ...)
if(!rfbEnableLogging) if(!rfbEnableLogging)
return; return;
if (! logMutex_initialized) {
INIT_MUTEX(logMutex);
logMutex_initialized = 1;
}
LOCK(logMutex); LOCK(logMutex);
va_start(args, format); va_start(args, format);
...@@ -654,7 +660,11 @@ rfbScreenInfoPtr rfbGetScreen(int* argc,char** argv, ...@@ -654,7 +660,11 @@ rfbScreenInfoPtr rfbGetScreen(int* argc,char** argv,
{ {
rfbScreenInfoPtr screen=calloc(sizeof(rfbScreenInfo),1); rfbScreenInfoPtr screen=calloc(sizeof(rfbScreenInfo),1);
if (! logMutex_initialized) {
INIT_MUTEX(logMutex); INIT_MUTEX(logMutex);
logMutex_initialized = 1;
}
if(width&3) if(width&3)
rfbErr("WARNING: Width (%d) is not a multiple of 4. VncViewer has problems with that.\n",width); rfbErr("WARNING: Width (%d) is not a multiple of 4. VncViewer has problems with that.\n",width);
......
#!/bin/bash #!/bin/bash
VERSION="0.7.3" VERSION="0.8"
cd "$(dirname "$0")" cd "$(dirname "$0")"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.TH X11VNC "1" "January 2006" "x11vnc " "User Commands" .TH X11VNC "1" "January 2006" "x11vnc " "User Commands"
.SH NAME .SH NAME
x11vnc - allow VNC connections to real X11 displays x11vnc - allow VNC connections to real X11 displays
version: 0.7.3, lastmod: 2006-01-10 version: 0.8, lastmod: 2006-01-11
.SH SYNOPSIS .SH SYNOPSIS
.B x11vnc .B x11vnc
[OPTION]... [OPTION]...
......
...@@ -15,7 +15,7 @@ int xtrap_base_event_type = 0; ...@@ -15,7 +15,7 @@ int xtrap_base_event_type = 0;
int xdamage_base_event_type = 0; int xdamage_base_event_type = 0;
/* date +'lastmod: %Y-%m-%d' */ /* date +'lastmod: %Y-%m-%d' */
char lastmod[] = "0.7.3 lastmod: 2006-01-10"; char lastmod[] = "0.8 lastmod: 2006-01-11";
/* X display info */ /* X display info */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment