Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv23978/src Modified Files: parsemeta.c Log Message: Fix bug in size of generic_32 packet pad. Remove paradise server from list of servers client can't use, in the metaserver display. Missed this check during first pass on adding paradise servers to metaserver. Reworked logic for saving and refreshing of servers on metaserver - the old method of using status changes irregardless of server age was not a good one. Better solution is to only check if the saved server status is an internal server state. Also, don't save server in cache if bogus age or when value. Index: parsemeta.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/parsemeta.c,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- parsemeta.c 16 Apr 2008 00:08:18 -0000 1.42 +++ parsemeta.c 8 Jul 2008 02:00:53 -0000 1.43 @@ -333,7 +333,7 @@ #endif /* Don't list servers we cannot use */ - if (slist->typeflag != 'P' && !metablock(slist->address)) + if (!metablock(slist->address)) { #ifdef DEBUG LineToConsole ("HOST:%-30s PORT:%-6d %12s %-5d %d %c\n", @@ -593,10 +593,12 @@ #endif } /* if it was found, check age. Don't update if old entry is newer or - of the same age. However, make sure status hasn't changed. If status - differs, we want to use the new information packet regardless of age. */ + of the same age. Always update servers with a status saved as + statusNull or higher, as this indicates either old data from the cache + or that the server somehow has a permanent internal status state, + which we don't want. */ else { - if ((now-age) < (sp->when-sp->age) && (sp->status == tempstatus)) { + if ((now-age) < (sp->when-sp->age) && (sp->status < statusNull)) { sp->age = (int)now - (int)(sp->when-sp->age); sp->when = now; sp->refresh = 1; @@ -856,7 +858,10 @@ continue; #endif /* Protect against saving corrupted server data */ - if (serverlist[i].address == NULL || serverlist[i].lifetime > MAX_LIFETIME) + if (serverlist[i].address == NULL + || serverlist[i].lifetime > MAX_LIFETIME + || serverlist[i].age < 0 + || serverlist[i].when > time(NULL)) continue; sprintf(str,"%s,%d,%lld,%d,%d,%d,%d,%c\n",