Fix a crash which qqshka reported, and fixed up some C style.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3021 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2008-07-07 20:39:21 +00:00
parent 8278f53e15
commit 9741aacb98
1 changed files with 7 additions and 7 deletions

View File

@ -97,9 +97,9 @@ void PF_InitTempStrings(progfuncs_t *prinst);
#ifdef SQL #ifdef SQL
// SQL prototypes // SQL prototypes
void SQL_Init(); void SQL_Init(void);
void SQL_KillServers(); void SQL_KillServers(void);
void SQL_DeInit(); void SQL_DeInit(void);
#endif #endif
typedef struct { typedef struct {
@ -6270,7 +6270,7 @@ void PF_search_begin (progfuncs_t *prinst, struct globalvars_s *pr_globals)
// qboolean quiet = G_FLOAT(OFS_PARM2); // qboolean quiet = G_FLOAT(OFS_PARM2);
prvmsearch_t *s; prvmsearch_t *s;
s = BZ_Malloc(sizeof(*s)); s = Z_Malloc(sizeof(*s));
s->fromprogs = prinst; s->fromprogs = prinst;
s->handle = prvm_nextsearchhandle++; s->handle = prvm_nextsearchhandle++;
@ -6489,7 +6489,7 @@ int sql_serverworker(void *sref)
} }
if (!(server->mysql = mysql_real_connect(server->mysql, server->connectparams[0], server->connectparams[1], server->connectparams[2], server->connectparams[3], port, 0, 0))) if (!(server->mysql = mysql_real_connect(server->mysql, server->connectparams[0], server->connectparams[1], server->connectparams[2], server->connectparams[3], port, 0, 0)))
error = "MYSQL initial connect attempt failed"; error = "MYSQL initial connect attempt failed";
if (colon) if (colon)
*colon = ':'; *colon = ':';
@ -6507,7 +6507,7 @@ int sql_serverworker(void *sref)
{ {
Sys_LockConditional(server->requestcondv); Sys_LockConditional(server->requestcondv);
if (!server->requests) // this is needed for thread startup and to catch any "lost" changes if (!server->requests) // this is needed for thread startup and to catch any "lost" changes
Sys_ConditionWait(server->requestcondv); Sys_ConditionWait(server->requestcondv);
needlock = false; // so we don't try to relock first round needlock = false; // so we don't try to relock first round
while (1) while (1)