almost 3000 lines of "errors" contained one actual memleak, one actually
unused variable and three actual ambiguous code parts
from cppcheck website: "The goal is to detect only real errors in the
code (i.e. have zero false positives)." :)
thx for finding five problems in our code
- cleanup scoreboard menu code
- clientlog info messages for debug binaries only
- have debug binaries check for easy docs errors
- docinvalid now also checks for broken references
This is coded into the priority of a server:
* a priority of -1000 or lower marks a server as disabled
* a priority of -10000 or lower excludes a server from being saved to
pcksources.cfg at program end, so a game restart will delete the server
from the list
According to SDL documentation, the SDL implementation of timedwait may
suck on some platforms, so it should only be used, where high CPU usage
during the wait is no issue.
getpckserver() will now only wait for one second for access to the
package server list and return an error instead of waiting indefinitely.
Don't have the main thread wait for the ping thread, because the ping
thread may take a long time to respond - when a server connection can't
be established. Sadly, there's no timeout for "connect()".
http get now uses two timeout values: one for the max time since last
server response, and one for total download time.
When AC is waiting for a server response (before a http header was
received), the progress bar will show the timeout "completion".
getmod modname
Try to download mods/modname.zip from all configured package servers.
Does not automatically activate the mod. The zip files are limited to
one megabyte total.
DOCREF getmod
* own source file for autodownload
* use cleaned up zip functions
* use new http get function (no more curl)
* enforce strict file naming rules and file size limits
* ping all package servers on every game start to determine ping times
* support media file update lists (also kept on package servers)
* allow users to manually prioritise package servers
* automatically select server with newest media file revision
new or changed commands:
addpckserver hostname [priority]
Adds a host name to the list of package servers. If a priority is given,
it influences the sorting of servers. Servers with higher priority are
queried first. If servers have the same priority, they are sorted by
ping. Default priority is zero.
getpackageserver
Returns a table with four columns of all configured package servers. The
columns are: host name, priority, ping and resolved.
"resolved" is a flag, indicating, if the server answered the ping during
game start.
removed cubescript idents: sortpckservers gamestarts
DOCREF addpckserver getpckserver