1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Implement httpfetch module and initialize it from main()

Add curl_parallel_limit setting that will replace media_fetch_threads in
a later commit.

Fix a typo in MutexedQueue::pop_back() that made it impossible to compile
code that used this function. (Noticed this while implementing httpfetch.)
This commit is contained in:
Kahrl 2013-08-29 05:04:56 +02:00
parent 67bf7130ce
commit 0ea3e6dbe2
6 changed files with 860 additions and 6 deletions

View file

@ -77,6 +77,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "subgame.h"
#include "quicktune.h"
#include "serverlist.h"
#include "httpfetch.h"
#include "guiEngine.h"
#include "mapsector.h"
@ -1001,6 +1002,9 @@ int main(int argc, char *argv[])
assert(res == CURLE_OK);
#endif
// Initialize HTTP fetcher
httpfetch_init(g_settings->getS32("curl_parallel_limit"));
/*
Run unit tests
*/
@ -1858,6 +1862,9 @@ int main(int argc, char *argv[])
}
}
// Stop httpfetch thread (if started)
httpfetch_cleanup();
END_DEBUG_EXCEPTION_HANDLER(errorstream)
debugstreams_deinit();