Backed out changeset 42462959f48d

This commit is contained in:
Fyren 2011-08-20 16:44:16 -07:00
parent 88d4abeaf8
commit d78a0c87b8
5 changed files with 12 additions and 15 deletions

View File

@ -26,7 +26,7 @@ OBJECTS += smn_bitbuffer.cpp smn_console.cpp smn_core.cpp \
smn_filesystem.cpp smn_halflife.cpp \
smn_keyvalues.cpp smn_player.cpp \
smn_usermsgs.cpp smn_menus.cpp smn_vector.cpp \
smn_hudtext.cpp smn_nextmap.cpp smn_database.cpp
smn_hudtext.cpp smn_nextmap.cpp
OBJECTS += ExtensionSys.cpp \
ForwardSys.cpp \
HandleSys.cpp \
@ -120,13 +120,12 @@ endif
CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_BLOODYGOODTIME=4 -DSE_EYE=5 \
-DSE_ORANGEBOXVALVE=6 -DSE_LEFT4DEAD=7 -DSE_LEFT4DEAD2=8 -DSE_ALIENSWARM=9
#LINK += /usr/lib/mysql/libmysqlclient_r.a /usr/lib/libssl.a /usr/lib/libkrb5.a /usr/lib/libcrypto.a $(HL2LIB)/tier1_i486.a $(HL2LIB)/mathlib_i486.a $(LIB_PREFIX)vstdlib$(LIB_SUFFIX)
LINK += $(HL2LIB)/tier1_i486.a $(HL2LIB)/mathlib_i486.a $(LIB_PREFIX)vstdlib$(LIB_SUFFIX) \
$(LIB_PREFIX)tier0$(LIB_SUFFIX) -static-libgcc -L/usr/lib/mysql -lmysqlclient
$(LIB_PREFIX)tier0$(LIB_SUFFIX) -static-libgcc
INCLUDE += -I. -I.. -I$(HL2PUB) -I$(HL2PUB)/engine -I$(HL2PUB)/mathlib -I$(HL2PUB)/vstdlib \
-I$(HL2PUB)/tier0 -I$(HL2PUB)/tier1 -I$(METAMOD) -I$(METAMOD)/sourcehook \
-I$(SMSDK)/public -I$(SMSDK)/public/sourcepawn -I/usr/include/mysql
-I$(SMSDK)/public -I$(SMSDK)/public/sourcepawn
CFLAGS += -D_LINUX -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp \
-D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -Wall -Werror \

View File

@ -29,7 +29,6 @@
* Version: $Id$
*/
#include "mysql.h"
#include "sm_globals.h"
#include "HandleSys.h"
#include "Database.h"
@ -663,23 +662,22 @@ static cell_t SQL_GetError(IPluginContext *pContext, const cell_t *params)
static cell_t SQL_QuoteString(IPluginContext *pContext, const cell_t *params)
{
//IDatabase *db = NULL;
//HandleError err;
IDatabase *db = NULL;
HandleError err;
/* if ((err = g_DBMan.ReadHandle(params[1], DBHandle_Database, (void **)&db))
if ((err = g_DBMan.ReadHandle(params[1], DBHandle_Database, (void **)&db))
!= HandleError_None)
{
return pContext->ThrowNativeError("Invalid database Handle %x (error: %d)", params[1], err);
}
*/
char *input, *output;
//size_t maxlength = (size_t)params[4];
size_t maxlength = (size_t)params[4];
pContext->LocalToString(params[2], &input);
pContext->LocalToString(params[3], &output);
size_t written;
bool s = mysql_escape_string(output, input, strlen(input));
bool s = db->QuoteString(input, output, maxlength, &written);
cell_t *addr;
pContext->LocalToPhysAddr(params[5], &addr);

View File

@ -85,11 +85,11 @@ ifeq "$(USEMETA)" "true"
-I$(METAMOD) -I$(METAMOD)/sourcehook -I$(SMSDK)/public -I$(SMSDK)/public/sourcepawn
else
INCLUDE += -I. -I.. -Isdk -I$(SMSDK)/public -I$(SMSDK)/public/sourcepawn -I$(MMSOURCE17)/core/sourcehook \
-I/usr/include/mysql
-I$(MYSQL)/include
CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_ORANGEBOXVALVE=4 -DSE_LEFT4DEAD=5
endif
LINK += -m32 /usr/lib/mysql/libmysqlclient_r.a -lz -lpthread
LINK += $(MYSQL)/lib/libmysqlclient_r.a -lz -lpthread
CFLAGS += -D_LINUX -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp \
-D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -Wall -Werror -Wno-switch \

View File

@ -186,7 +186,7 @@ bool MyDatabase::QuoteString(const char *str, char buffer[], size_t maxlength, s
return false;
}
needed = mysql_escape_string(buffer, str, size);
needed = mysql_real_escape_string(m_mysql, buffer, str, size);
if (newSize)
{
*newSize = (size_t)needed;

View File

@ -47,7 +47,7 @@ the end
The Patty Winters show this morning was about how terrible sawce is, same as yesterday's show; however, things are looking up for tomorrow.
IT'S CLOBBERIN' TIME
vc2005 supremecy
clobstermonkey
clobbermonkey
that thing
clobber build because amx.h changed (sigh)
a dead fish