mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-28 07:02:38 +00:00
masterserver_debug to set CURLOPT_VERBOSE
This commit is contained in:
parent
8228182823
commit
2cfb04f90b
3 changed files with 9 additions and 0 deletions
|
@ -32,6 +32,11 @@ consvar_t cv_masterserver_token = {
|
||||||
NULL, NULL, 0, NULL, NULL, 0, 0, NULL/* C90 moment */
|
NULL, NULL, 0, NULL, NULL, 0, 0, NULL/* C90 moment */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
consvar_t cv_masterserver_debug = {
|
||||||
|
"masterserver_debug", "Off", CV_SAVE, CV_OnOff,
|
||||||
|
NULL, 0, NULL, NULL, 0, 0, NULL/* C90 moment */
|
||||||
|
};
|
||||||
|
|
||||||
static int hms_started;
|
static int hms_started;
|
||||||
|
|
||||||
static char hms_server_token[sizeof "xxx.xxx.xxx.xxx/xxxxx"];
|
static char hms_server_token[sizeof "xxx.xxx.xxx.xxx/xxxxx"];
|
||||||
|
@ -97,6 +102,8 @@ HMS_connect (const char *format, ...)
|
||||||
buffer->buffer = malloc(buffer->end);
|
buffer->buffer = malloc(buffer->end);
|
||||||
buffer->needle = 0;
|
buffer->needle = 0;
|
||||||
|
|
||||||
|
if (cv_masterserver_debug.value)
|
||||||
|
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||||
curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
|
curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, url);
|
curl_easy_setopt(curl, CURLOPT_URL, url);
|
||||||
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
|
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
|
||||||
|
|
|
@ -233,6 +233,7 @@ void AddMServCommands(void)
|
||||||
CV_RegisterVar(&cv_masterserver);
|
CV_RegisterVar(&cv_masterserver);
|
||||||
CV_RegisterVar(&cv_http_masterserver);
|
CV_RegisterVar(&cv_http_masterserver);
|
||||||
CV_RegisterVar(&cv_masterserver_token);
|
CV_RegisterVar(&cv_masterserver_token);
|
||||||
|
CV_RegisterVar(&cv_masterserver_debug);
|
||||||
CV_RegisterVar(&cv_servername);
|
CV_RegisterVar(&cv_servername);
|
||||||
COM_AddCommand("listserv", Command_Listserv_f);
|
COM_AddCommand("listserv", Command_Listserv_f);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -66,6 +66,7 @@ typedef struct
|
||||||
extern consvar_t cv_masterserver, cv_servername;
|
extern consvar_t cv_masterserver, cv_servername;
|
||||||
extern consvar_t cv_http_masterserver;
|
extern consvar_t cv_http_masterserver;
|
||||||
extern consvar_t cv_masterserver_token;
|
extern consvar_t cv_masterserver_token;
|
||||||
|
extern consvar_t cv_masterserver_debug;
|
||||||
|
|
||||||
// < 0 to not connect (usually -1) (offline mode)
|
// < 0 to not connect (usually -1) (offline mode)
|
||||||
// == 0 to show all rooms, not a valid hosting room
|
// == 0 to show all rooms, not a valid hosting room
|
||||||
|
|
Loading…
Reference in a new issue