Added UltraVNC Repeater

Signed-off-by: Jirka Spicak <robutek@gmail.com>
This commit is contained in:
JimmyS83
2016-11-17 09:44:20 +01:00
committed by JimmyS83
parent 583af8565e
commit 7c305d4cf8
3 changed files with 147 additions and 0 deletions
@@ -0,0 +1,39 @@
--- vncrepeater-0.14/Makefile 2006-04-09 23:37:10.000000000 +0200
+++ vncrepeater-0.14.new/Makefile 2016-11-09 19:59:13.000000000 +0100
@@ -1,27 +1,28 @@
CFLAGS=-Wall
repeater: repeater.o repeaterproc.o openbsd_stringfuncs.o iniparser.o readini.o repeaterutil.o repeaterevents.o
- g++ $(CFLAGS) -o repeater repeater.o repeaterproc.o openbsd_stringfuncs.o iniparser.o readini.o repeaterutil.o repeaterevents.o
+ $(CC) $(CFLAGS) -o repeater repeater.o repeaterproc.o openbsd_stringfuncs.o iniparser.o readini.o repeaterutil.o repeaterevents.o $(LDFLAGS)
repeater.o: repeater.cpp
- g++ $(CFLAGS) -c repeater.cpp
+ $(CC) $(CFLAGS) -c repeater.cpp
repeaterproc.o: repeaterproc.cpp
- g++ $(CFLAGS) -c repeaterproc.cpp
+ $(CC) $(CFLAGS) -c repeaterproc.cpp
openbsd_stringfuncs.o: openbsd_stringfuncs.cpp
- g++ $(CFLAGS) -c openbsd_stringfuncs.cpp
+ $(CC) $(CFLAGS) -c openbsd_stringfuncs.cpp
iniparser.o: iniparser.cpp
- g++ $(CFLAGS) -c iniparser.cpp
+ $(CC) $(CFLAGS) -c iniparser.cpp
readini.o: readini.cpp
- g++ $(CFLAGS) -c readini.cpp
+ $(CC) $(CFLAGS) -c readini.cpp
repeaterutil.o: repeaterutil.cpp
- g++ $(CFLAGS) -c repeaterutil.cpp
+ $(CC) $(CFLAGS) -c repeaterutil.cpp
repeaterevents.o: repeaterevents.cpp
- g++ $(CFLAGS) -c repeaterevents.cpp
+ $(CC) $(CFLAGS) -c repeaterevents.cpp
clean:
rm -f *.o repeater
+
@@ -0,0 +1,38 @@
--- vncrepeater-0.14/repeater.cpp 2006-10-20 17:07:50.000000000 +0200
+++ vncrepeater-0.14.new/repeater.cpp 2016-11-19 17:04:59.907871000 +0100
@@ -593,7 +593,9 @@
static long parseId(char *IdCode)
{
unsigned int ii;
- int retVal;
+ //PFaf 20101122: Minor correction due to compiler warning
+ //int retVal;
+ long retVal;
debug(LEVEL_3, "parseId(): IdCode = %s\n", IdCode);
@@ -998,9 +1000,13 @@
allow = false;
//server 0 == denied
- if ((srvAddr.a == 0) || (srvAddr.b == 0) || (srvAddr.c == 0) || (srvAddr.d == 0))
+ //Fix by PFaf - 20101122
+ //Server address can be X.0.0.Y i.e. 10.0.0.1
+ //since these are valid addresses, so we should not exclude them.
+ //Only exclude addresses that start or end with zeros (0).
+ //if ((srvAddr.a == 0) || (srvAddr.b == 0) || (srvAddr.c == 0) || (srvAddr.d == 0))
+ if ((srvAddr.a == 0) || (srvAddr.d == 0))
allow = false;
-
//allowed so far ?
if (allow)
@@ -1983,7 +1989,7 @@
struct sigaction saInt;
//ini file default
- char defaultIniFilePathAndName[] = "/etc/uvncrepeater.ini";
+ char defaultIniFilePathAndName[] = "/etc/vncrepeater.conf";
char tmpBuf[MAX_PATH];
bool memoryOk;