Skip to content

Commit

Permalink
Merge remote-tracking branch 'yquake2/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
0lvin committed Dec 22, 2024
2 parents 54e32cb + 9e127cf commit a4511bd
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
3 changes: 3 additions & 0 deletions doc/040_cvarlist.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ it's `+set busywait 0` (setting the `busywait` cvar) and `-portable`
* **cl_http_max_connections**: Maximum number of parallel downloads. Set
to `4` by default. A higher number may help with slow servers.

* **cl_http_verifypeer**: SSL certificate validation. Set to `1`
by default, set to `0` to disable.

* **cl_http_proxy**: Proxy to use, empty by default.

* **cl_http_show_dw_progress**: Show a HTTP download progress bar.
Expand Down
3 changes: 2 additions & 1 deletion src/client/cl_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,8 @@ CL_InitLocal(void)
cl_vwep = Cvar_Get("cl_vwep", "1", CVAR_ARCHIVE);

#ifdef USE_CURL
cl_http_proxy = Cvar_Get("cl_http_proxy", "", 0);
cl_http_verifypeer = Cvar_Get("cl_http_verifypeer", "1", CVAR_ARCHIVE);
cl_http_proxy = Cvar_Get("cl_http_proxy", "", CVAR_ARCHIVE);
cl_http_filelists = Cvar_Get("cl_http_filelists", "1", 0);
cl_http_downloads = Cvar_Get("cl_http_downloads", "1", CVAR_ARCHIVE);
cl_http_max_connections = Cvar_Get("cl_http_max_connections", "4", 0);
Expand Down
4 changes: 2 additions & 2 deletions src/client/cl_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,10 @@ CL_DeltaEntity(frame_t *frame, int newnum, entity_xstate_t *old, int bits)
static void
CL_ParsePacketEntities(frame_t *oldframe, frame_t *newframe)
{
unsigned int newnum;
unsigned bits;
entity_xstate_t *oldstate = NULL;
int oldindex, oldnum;
unsigned int newnum;
unsigned bits;

newframe->parse_entities = cl.parse_entities;
newframe->num_entities = 0;
Expand Down
3 changes: 3 additions & 0 deletions src/client/curl/download.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

cvar_t *cl_http_downloads;
cvar_t *cl_http_filelists;
cvar_t *cl_http_verifypeer;
cvar_t *cl_http_proxy;
cvar_t *cl_http_max_connections;
cvar_t *cl_http_show_dw_progress;
Expand Down Expand Up @@ -293,6 +294,8 @@ static void CL_StartHTTPDownload (dlqueue_t *entry, dlhandle_t *dl)
qcurl_easy_setopt(dl->curl, CURLOPT_WRITEFUNCTION, CL_HTTP_Recv);
}

qcurl_easy_setopt(dl->curl, CURLOPT_SSL_VERIFYPEER, (long)cl_http_verifypeer->value);
qcurl_easy_setopt(dl->curl, CURLOPT_PROXY_SSL_VERIFYPEER, (long)cl_http_verifypeer->value);
qcurl_easy_setopt(dl->curl, CURLOPT_PROXY, cl_http_proxy->string);
qcurl_easy_setopt(dl->curl, CURLOPT_LOW_SPEED_TIME, (long)cl_http_bw_limit_tmout->value);
qcurl_easy_setopt(dl->curl, CURLOPT_LOW_SPEED_LIMIT, (long)cl_http_bw_limit_rate->value);
Expand Down
1 change: 1 addition & 0 deletions src/client/curl/header/download.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ extern dlquirks_t dlquirks;

extern cvar_t *cl_http_downloads;
extern cvar_t *cl_http_filelists;
extern cvar_t *cl_http_verifypeer;
extern cvar_t *cl_http_proxy;
extern cvar_t *cl_http_max_connections;
extern cvar_t *cl_http_show_dw_progress;
Expand Down

0 comments on commit a4511bd

Please sign in to comment.