logMutex needs to be initialized too; in rfbDefaultLog.

pull/1/head
runge 19 years ago
parent 57cf0cdab5
commit 9b3163c00b

@ -38,6 +38,8 @@
#include <signal.h>
#include <time.h>
static int extMutex_initialized = 0;
static int logMutex_initialized = 0;
#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
static MUTEX(logMutex);
static MUTEX(extMutex);
@ -61,7 +63,6 @@ void
rfbRegisterProtocolExtension(rfbProtocolExtension* extension)
{
rfbProtocolExtension* last;
static int extMutex_initialized = 0;
if (! extMutex_initialized) {
INIT_MUTEX(extMutex);
@ -152,6 +153,11 @@ rfbDefaultLog(const char *format, ...)
if(!rfbEnableLogging)
return;
if (! logMutex_initialized) {
INIT_MUTEX(logMutex);
logMutex_initialized = 1;
}
LOCK(logMutex);
va_start(args, format);
@ -654,7 +660,11 @@ rfbScreenInfoPtr rfbGetScreen(int* argc,char** argv,
{
rfbScreenInfoPtr screen=calloc(sizeof(rfbScreenInfo),1);
INIT_MUTEX(logMutex);
if (! logMutex_initialized) {
INIT_MUTEX(logMutex);
logMutex_initialized = 1;
}
if(width&3)
rfbErr("WARNING: Width (%d) is not a multiple of 4. VncViewer has problems with that.\n",width);

@ -1,6 +1,6 @@
#!/bin/bash
VERSION="0.7.3"
VERSION="0.8"
cd "$(dirname "$0")"

File diff suppressed because it is too large Load Diff

@ -2,7 +2,7 @@
.TH X11VNC "1" "January 2006" "x11vnc " "User Commands"
.SH NAME
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
.B x11vnc
[OPTION]...

@ -15,7 +15,7 @@ int xtrap_base_event_type = 0;
int xdamage_base_event_type = 0;
/* 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 */

Loading…
Cancel
Save