summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--example.dsp31
-rw-r--r--libvncserver.dsp44
-rw-r--r--libvncserver.dsw44
-rw-r--r--main.c3
-rw-r--r--rfb.h3
-rw-r--r--rfbserver.c4
-rw-r--r--sockets.c7
7 files changed, 112 insertions, 24 deletions
diff --git a/example.dsp b/example.dsp
index ebabc4a..16788cb 100644
--- a/example.dsp
+++ b/example.dsp
@@ -1,11 +1,24 @@
# Microsoft Developer Studio Project File - Name="example" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** NICHT BEARBEITEN **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=example - Win32 Debug
-!MESSAGE "example - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "example - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
+!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl
+!MESSAGE
+!MESSAGE NMAKE /f "example.mak".
+!MESSAGE
+!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
+!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
+!MESSAGE
+!MESSAGE NMAKE /f "example.mak" CFG="example - Win32 Debug"
+!MESSAGE
+!MESSAGE Für die Konfiguration stehen zur Auswahl:
+!MESSAGE
+!MESSAGE "example - Win32 Release" (basierend auf "Win32 (x86) Console Application")
+!MESSAGE "example - Win32 Debug" (basierend auf "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
@@ -28,15 +41,15 @@ RSC=rc.exe
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /I "zlib" /I "libjpeg" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x407 /d "NDEBUG"
# ADD RSC /l 0x407 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib zlib.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"msvcrt.lib"
!ELSEIF "$(CFG)" == "example - Win32 Debug"
@@ -51,16 +64,16 @@ LINK32=link.exe
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "zlib" /I "libjpeg" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x407 /d "_DEBUG"
# ADD RSC /l 0x407 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib libvncserver.lib libjpeg.a libz.a /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib zlib.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"msvcrt.lib" /pdbtype:sept
!ENDIF
diff --git a/libvncserver.dsp b/libvncserver.dsp
index 1ff5d1e..0dd25b5 100644
--- a/libvncserver.dsp
+++ b/libvncserver.dsp
@@ -5,8 +5,20 @@
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=libvncserver - Win32 Debug
-!MESSAGE "libvncserver - Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "libvncserver - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
+!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl
+!MESSAGE
+!MESSAGE NMAKE /f "libvncserver.mak".
+!MESSAGE
+!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
+!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
+!MESSAGE
+!MESSAGE NMAKE /f "libvncserver.mak" CFG="libvncserver - Win32 Debug"
+!MESSAGE
+!MESSAGE Für die Konfiguration stehen zur Auswahl:
+!MESSAGE
+!MESSAGE "libvncserver - Win32 Release" (basierend auf "Win32 (x86) Static Library")
+!MESSAGE "libvncserver - Win32 Debug" (basierend auf "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
@@ -29,7 +41,7 @@ RSC=rc.exe
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /I "zlib" /I "libjpeg" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD BASE RSC /l 0x407 /d "NDEBUG"
# ADD RSC /l 0x407 /d "NDEBUG"
BSC32=bscmake.exe
@@ -51,8 +63,8 @@ LIB32=link.exe -lib
# PROP Output_Dir "libvncserver___Win32_Debug"
# PROP Intermediate_Dir "libvncserver___Win32_Debug"
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "zlib" /I "libjpeg" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD BASE RSC /l 0x407 /d "_DEBUG"
# ADD RSC /l 0x407 /d "_DEBUG"
BSC32=bscmake.exe
@@ -72,6 +84,8 @@ LIB32=link.exe -lib
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Group "auth"
+
+# PROP Default_Filter ""
# Begin Source File
SOURCE=.\auth.c
@@ -91,6 +105,10 @@ SOURCE=.\vncauth.c
# End Group
# Begin Source File
+SOURCE=.\cargs.c
+# End Source File
+# Begin Source File
+
SOURCE=.\corre.c
# End Source File
# Begin Source File
@@ -103,6 +121,10 @@ SOURCE=.\cutpaste.c
# End Source File
# Begin Source File
+SOURCE=.\draw.c
+# End Source File
+# Begin Source File
+
SOURCE=.\font.c
# End Source File
# Begin Source File
@@ -127,6 +149,10 @@ SOURCE=.\rre.c
# End Source File
# Begin Source File
+SOURCE=.\selbox.c
+# End Source File
+# Begin Source File
+
SOURCE=.\sockets.c
# End Source File
# Begin Source File
@@ -153,7 +179,9 @@ SOURCE=.\zlib.c
# Begin Group "Headers"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Group "auth"
+# Begin Group "auth Nr. 1"
+
+# PROP Default_Filter ""
# Begin Source File
SOURCE=.\d3des.h
@@ -161,6 +189,10 @@ SOURCE=.\d3des.h
# End Group
# Begin Source File
+SOURCE=.\default8x16.h
+# End Source File
+# Begin Source File
+
SOURCE=.\keysym.h
# End Source File
# Begin Source File
diff --git a/libvncserver.dsw b/libvncserver.dsw
index 93b60c1..799cfb4 100644
--- a/libvncserver.dsw
+++ b/libvncserver.dsw
@@ -14,6 +14,24 @@ Package=<4>
Begin Project Dependency
Project_Dep_Name libvncserver
End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libjpeg
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name zlib
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "libjpeg"=.\libjpeg\libjpeg.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
}}}
###############################################################################
@@ -26,11 +44,17 @@ Package=<5>
Package=<4>
{{{
+ Begin Project Dependency
+ Project_Dep_Name libjpeg
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name zlib
+ End Project Dependency
}}}
###############################################################################
-Project: "rdp2vnc"=..\rdp2vnc\rdp2vnc.dsp - Package Owner=<4>
+Project: "rdp2vnc"=\my\rdp2vnc\rdp2vnc\rdp2vnc.dsp - Package Owner=<4>
Package=<5>
{{{
@@ -41,6 +65,24 @@ Package=<4>
Begin Project Dependency
Project_Dep_Name libvncserver
End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libjpeg
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name zlib
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "zlib"=.\zlib\zlib.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
}}}
###############################################################################
diff --git a/main.c b/main.c
index 6e2ad2b..f406918 100644
--- a/main.c
+++ b/main.c
@@ -401,7 +401,6 @@ Bool defaultPasswordCheck(rfbClientPtr cl,char* response,int len)
of char*'s, where the last pointer is 0. */
Bool checkPasswordByList(rfbClientPtr cl,char* response,int len)
{
- int i;
char **passwds;
for(passwds=(char**)cl->screen->rfbAuthPasswdData;*passwds;passwds++) {
@@ -565,7 +564,7 @@ void rfbInitServer(rfbScreenInfoPtr rfbScreen)
#include <conio.h>
#include <sys/timeb.h>
-void gettimeofday(struct timeval* tv,char*)
+void gettimeofday(struct timeval* tv,char* dummy)
{
SYSTEMTIME t;
GetSystemTime(&t);
diff --git a/rfb.h b/rfb.h
index 67857fb..92d4522 100644
--- a/rfb.h
+++ b/rfb.h
@@ -29,7 +29,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/time.h>
#include <zlib.h>
#include "keysym.h"
@@ -85,11 +84,13 @@ typedef CARD32 KeySym;
#endif
#ifdef WIN32
+#include <sys/timeb.h>
#include <winsock.h>
#undef SOCKET
#define SOCKET int
#else
int max(int,int);
+#include <sys/time.h>
#include <netinet/in.h>
#define SOCKET int
#endif
diff --git a/rfbserver.c b/rfbserver.c
index 48c6e66..b75d1c7 100644
--- a/rfbserver.c
+++ b/rfbserver.c
@@ -205,6 +205,8 @@ rfbNewTCPOrUDPClient(rfbScreen,sock,isUDP)
rfbReleaseClientIterator(iterator);
FD_SET(sock,&(rfbScreen->allFds));
+ rfbScreen->maxFd = max(sock,rfbScreen->maxFd);
+
INIT_MUTEX(cl->outputMutex);
INIT_MUTEX(cl->refCountMutex);
INIT_COND(cl->deleteCond);
@@ -326,6 +328,8 @@ rfbClientConnectionGone(cl)
}
#endif
+ FD_CLR(cl->sock,&(cl->screen->allFds));
+
cl->clientGoneHook(cl);
rfbLog("Client %s gone\n",cl->host);
diff --git a/sockets.c b/sockets.c
index 7134468..4607420 100644
--- a/sockets.c
+++ b/sockets.c
@@ -69,9 +69,9 @@ struct timeval
#include "rfb.h"
-#ifndef WIN32
+//#ifndef WIN32
int max(int i,int j) { return(i<j?j:i); }
-#endif
+//#endif
int rfbMaxClientWait = 20000; /* time (ms) after which we decide client has
gone away - needed to stop us hanging */
@@ -203,9 +203,6 @@ rfbCheckFds(rfbScreenInfoPtr rfbScreen,long usec)
rfbLog("Got connection from client %s\n", inet_ntoa(addr.sin_addr));
- FD_SET(sock, &(rfbScreen->allFds));
- rfbScreen->maxFd = max(sock,rfbScreen->maxFd);
-
rfbNewClient(rfbScreen,sock);
FD_CLR(rfbScreen->rfbListenSock, &fds);