mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
User agent in http fetcher
This commit is contained in:
parent
0a09af4b33
commit
f2a7f5f8dd
|
@ -1,6 +1,7 @@
|
||||||
#include <base/system.h>
|
#include <base/system.h>
|
||||||
#include <engine/storage.h>
|
#include <engine/storage.h>
|
||||||
#include <engine/shared/config.h>
|
#include <engine/shared/config.h>
|
||||||
|
#include <game/version.h>
|
||||||
#include "fetcher.h"
|
#include "fetcher.h"
|
||||||
|
|
||||||
CFetchTask::CFetchTask(bool canTimeout, bool useDDNetCA)
|
CFetchTask::CFetchTask(bool canTimeout, bool useDDNetCA)
|
||||||
|
@ -158,6 +159,7 @@ void CFetcher::FetchFile(CFetchTask *pTask)
|
||||||
curl_easy_setopt(m_pHandle, CURLOPT_PROGRESSDATA, pTask);
|
curl_easy_setopt(m_pHandle, CURLOPT_PROGRESSDATA, pTask);
|
||||||
curl_easy_setopt(m_pHandle, CURLOPT_PROGRESSFUNCTION, &CFetcher::ProgressCallback);
|
curl_easy_setopt(m_pHandle, CURLOPT_PROGRESSFUNCTION, &CFetcher::ProgressCallback);
|
||||||
curl_easy_setopt(m_pHandle, CURLOPT_NOSIGNAL, 1L);
|
curl_easy_setopt(m_pHandle, CURLOPT_NOSIGNAL, 1L);
|
||||||
|
curl_easy_setopt(m_pHandle, CURLOPT_USERAGENT, "DDNet " GAME_RELEASE_VERSION " (" CONF_PLATFORM_STRING "; " CONF_FAMILY_STRING "; " CONF_ARCH_STRING ")");
|
||||||
|
|
||||||
dbg_msg("fetcher", "downloading %s", pTask->m_aDest);
|
dbg_msg("fetcher", "downloading %s", pTask->m_aDest);
|
||||||
pTask->m_State = CFetchTask::STATE_RUNNING;
|
pTask->m_State = CFetchTask::STATE_RUNNING;
|
||||||
|
|
|
@ -5,6 +5,6 @@
|
||||||
#include "generated/nethash.cpp"
|
#include "generated/nethash.cpp"
|
||||||
#define GAME_VERSION "0.6.3, 10.8.3"
|
#define GAME_VERSION "0.6.3, 10.8.3"
|
||||||
#define GAME_NETVERSION "0.6 626fce9a778df4d4"
|
#define GAME_NETVERSION "0.6 626fce9a778df4d4"
|
||||||
static const char GAME_RELEASE_VERSION[8] = "10.8.3";
|
#define GAME_RELEASE_VERSION "10.8.3"
|
||||||
#define CLIENT_VERSIONNR 10083
|
#define CLIENT_VERSIONNR 10083
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue