Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Kart-Public
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andrew Bradley
Kart-Public
Commits
fcbe4e66
Commit
fcbe4e66
authored
4 years ago
by
James R.
Browse files
Options
Downloads
Patches
Plain Diff
Set timeout on HMS connections
parent
bd3ea52c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/http-mserv.c
+6
-0
6 additions, 0 deletions
src/http-mserv.c
src/mserv.c
+1
-0
1 addition, 0 deletions
src/mserv.c
src/mserv.h
+1
-0
1 addition, 0 deletions
src/mserv.h
with
8 additions
and
0 deletions
src/http-mserv.c
+
6
−
0
View file @
fcbe4e66
...
...
@@ -34,6 +34,11 @@ Documentation available here.
static
void
MasterServer_Debug_OnChange
(
void
);
consvar_t
cv_masterserver_timeout
=
{
"masterserver_timeout"
,
"5"
,
CV_SAVE
,
CV_Unsigned
,
NULL
,
0
,
NULL
,
NULL
,
0
,
0
,
NULL
/* C90 moment */
};
consvar_t
cv_masterserver_debug
=
{
"masterserver_debug"
,
"Off"
,
CV_SAVE
|
CV_CALL
,
CV_OnOff
,
MasterServer_Debug_OnChange
,
0
,
NULL
,
NULL
,
0
,
0
,
NULL
/* C90 moment */
...
...
@@ -165,6 +170,7 @@ HMS_connect (const char *format, ...)
curl_easy_setopt
(
curl
,
CURLOPT_FOLLOWLOCATION
,
1L
);
curl_easy_setopt
(
curl
,
CURLOPT_IPRESOLVE
,
CURL_IPRESOLVE_V4
);
curl_easy_setopt
(
curl
,
CURLOPT_TIMEOUT
,
cv_masterserver_timeout
.
value
);
curl_easy_setopt
(
curl
,
CURLOPT_WRITEFUNCTION
,
HMS_on_read
);
curl_easy_setopt
(
curl
,
CURLOPT_WRITEDATA
,
buffer
);
...
...
This diff is collapsed.
Click to expand it.
src/mserv.c
+
1
−
0
View file @
fcbe4e66
...
...
@@ -87,6 +87,7 @@ void AddMServCommands(void)
#ifndef NONET
CV_RegisterVar
(
&
cv_masterserver
);
CV_RegisterVar
(
&
cv_masterserver_update_rate
);
CV_RegisterVar
(
&
cv_masterserver_timeout
);
CV_RegisterVar
(
&
cv_masterserver_debug
);
CV_RegisterVar
(
&
cv_servername
);
COM_AddCommand
(
"listserv"
,
Command_Listserv_f
);
...
...
This diff is collapsed.
Click to expand it.
src/mserv.h
+
1
−
0
View file @
fcbe4e66
...
...
@@ -66,6 +66,7 @@ typedef struct
extern
consvar_t
cv_masterserver
,
cv_servername
;
extern
consvar_t
cv_masterserver_update_rate
;
extern
consvar_t
cv_masterserver_timeout
;
extern
consvar_t
cv_masterserver_debug
;
// < 0 to not connect (usually -1) (offline mode)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment