--- a/repeater.cpp +++ b/repeater.cpp @@ -593,7 +593,9 @@ static bool checkIdCode(char *IdCode) 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 @@ static bool isServerAddressAllowed(char 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 @@ int main(int argc, char **argv) struct sigaction saInt; //ini file default - char defaultIniFilePathAndName[] = "/etc/uvncrepeater.ini"; + char defaultIniFilePathAndName[] = "/etc/vncrepeater.conf"; char tmpBuf[MAX_PATH]; bool memoryOk;