aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorKahrl <kahrl@gmx.net>2013-08-29 05:04:56 +0200
committerKahrl <kahrl@gmx.net>2013-12-13 18:05:10 +0100
commit0ea3e6dbe2288854d9d4a971fc6539c2e740a95a (patch)
tree2bd1e8485e0fe14cc69fefb8cae66a76f1086aee /src/main.cpp
parent67bf7130ce3f1780a432ae03eabdec3118ecab70 (diff)
downloadminetest-0ea3e6dbe2288854d9d4a971fc6539c2e740a95a.tar.xz
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.)
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 57c2f06a5..239d68246 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -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();