mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-25 11:50:50 +00:00
Master server: use I_OutputMsg during startup
CONS_Printf calls CON_Drawer during startup, thread collision stuff.
This commit is contained in:
parent
2137a096e6
commit
f2534f8cb5
1 changed files with 15 additions and 1 deletions
|
@ -21,6 +21,7 @@ Documentation available here.
|
|||
#include "doomdef.h"
|
||||
#include "d_clisrv.h"
|
||||
#include "command.h"
|
||||
#include "console.h"
|
||||
#include "m_argv.h"
|
||||
#include "m_menu.h"
|
||||
#include "mserv.h"
|
||||
|
@ -78,6 +79,19 @@ Contact_error (void)
|
|||
);
|
||||
}
|
||||
|
||||
static void
|
||||
Printf_url (const char *url)
|
||||
{
|
||||
boolean startup;
|
||||
|
||||
I_lock_mutex(&con_mutex);
|
||||
startup = con_startup;
|
||||
I_unlock_mutex(con_mutex);
|
||||
|
||||
(startup ? I_OutputMsg : CONS_Printf)(
|
||||
"HMS: connecting '%s'...\n", url);
|
||||
}
|
||||
|
||||
static size_t
|
||||
HMS_on_read (char *s, size_t _1, size_t n, void *userdata)
|
||||
{
|
||||
|
@ -177,7 +191,7 @@ HMS_connect (const char *format, ...)
|
|||
if (quack_token)
|
||||
sprintf(&url[seek], "&token=%s", quack_token);
|
||||
|
||||
CONS_Printf("HMS: connecting '%s'...\n", url);
|
||||
Printf_url(url);
|
||||
|
||||
buffer = malloc(sizeof *buffer);
|
||||
buffer->curl = curl;
|
||||
|
|
Loading…
Reference in a new issue