- Fix Makefile patch.

- Remove part of patch-server__sv_main.c which was causing a "Bad challenge"
  error when connecting to a password protected server [1].

Reported by:	"Kyle Hunter" <keletmaster@gmail.com> [1]
This commit is contained in:
Alejandro Pulver 2007-03-31 02:32:23 +00:00
parent f842ed178e
commit 14782b4f28
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=188850
2 changed files with 15 additions and 27 deletions

View File

@ -1,5 +1,5 @@
--- linux/Makefile.orig Mon Mar 26 00:13:44 2007
+++ linux/Makefile Mon Mar 26 00:14:51 2007
--- linux/Makefile.orig Fri Mar 30 23:06:46 2007
+++ linux/Makefile Fri Mar 30 23:13:43 2007
@@ -11,25 +11,14 @@
GLIBC=
endif
@ -30,7 +30,7 @@
CLIENT_DIR=$(MOUNT_DIR)/client
SERVER_DIR=$(MOUNT_DIR)/server
REF_GL_DIR=$(MOUNT_DIR)/ref_gl
@@ -42,51 +31,29 @@
@@ -42,51 +31,31 @@
EGCS=/usr/local/egcs-1.1.2/bin/gcc
@ -42,13 +42,14 @@
-_LIB := lib
-endif
-
-BASE_CFLAGS=-Dstricmp=strcasecmp -D_stricmp=strcasecmp -D__unix__
-BASE_CFLAGS=-Dstricmp=strcasecmp -D_stricmp=strcasecmp -D__linux__
-
-ifeq ($(ARCH),axp)
-RELEASE_CFLAGS=$(BASE_CFLAGS) -ffast-math -funroll-loops \
- -fomit-frame-pointer -fexpensive-optimizations
-endif
-
+CC?=gcc
-ifeq ($(ARCH),ppc)
-RELEASE_CFLAGS=$(BASE_CFLAGS) -O2 -ffast-math -funroll-loops \
- -fomit-frame-pointer -fexpensive-optimizations
@ -95,7 +96,7 @@
SDLCFLAGS=$(shell sdl-config --cflags)
SDLLDFLAGS=$(shell sdl-config --libs)
@@ -115,19 +82,19 @@
@@ -115,19 +84,19 @@
# SETUP AND BUILD
#############################################################################
@ -125,7 +126,7 @@
endif
build_debug:
@@ -234,18 +201,14 @@
@@ -234,18 +203,14 @@
SOUND_SDL_OBJS = \
$(BUILDDIR)/client/snd_sdl.o
@ -146,7 +147,7 @@
$(CC) $(CFLAGS) -o $@ $(CODERED_OBJS) $(SOUND_SDL_OBJS) $(CODERED_AS_OBJS) $(LDFLAGS) $(REF_GL_OBJS) $(REF_GL_GLX_OBJS) $(GLXLDFLAGS) $(SDLLDFLAGS)
$(BUILDDIR)/client/cl_cin.o : $(CLIENT_DIR)/cl_cin.c
@@ -478,7 +441,7 @@
@@ -478,7 +443,7 @@
$(BUILDDIR)/ded/cl_null.o \
$(BUILDDIR)/ded/cd_null.o
@ -155,7 +156,7 @@
$(CC) $(CFLAGS) -o $@ $(CRDED_OBJS) $(LDFLAGS)
$(BUILDDIR)/ded/cmd.o : $(COMMON_DIR)/cmd.c
@@ -597,7 +560,7 @@
@@ -597,7 +562,7 @@
@ -164,7 +165,7 @@
$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(GAME_OBJS)
@@ -753,7 +716,7 @@
@@ -753,7 +718,7 @@
$(BUILDDIR)/arena/p_weapon.o \
$(BUILDDIR)/arena/vehicles.o

View File

@ -1,6 +1,6 @@
--- ./server/sv_main.c.orig Tue May 16 15:20:10 2006
+++ ./server/sv_main.c Tue May 16 15:20:10 2006
@@ -445,8 +445,9 @@
--- server/sv_main.c.orig Fri Mar 30 23:15:20 2007
+++ server/sv_main.c Fri Mar 30 23:16:36 2007
@@ -450,8 +450,9 @@
return;
}
@ -12,20 +12,7 @@
//check it is not overflowed, save enough bytes for /ip/111.222.333.444:55555
if (strlen(userinfo) + 25 >= sizeof(userinfo)-1)
@@ -502,8 +503,11 @@
{
if (NET_CompareBaseAdr (net_from, svs.challenges[i].adr))
{
- if (challenge == svs.challenges[i].challenge)
+ // sku - ignore zero challenges
+ if( svs.challenges[i].challenge && challenge == svs.challenges[i].challenge ) {
+ svs.challenges[i].challenge = 0;
break; // good
+ }
Netchan_OutOfBandPrint (NS_SERVER, adr, "print\nBad challenge.\n");
return;
}
@@ -588,12 +592,6 @@
@@ -595,12 +596,6 @@
Netchan_OutOfBandPrint (NS_SERVER, adr, "print\nConnection refused.\n" );
Com_DPrintf ("Game rejected a connection.\n");
return;