From 5365ea4f4ee71f79d2a8b1666f709be0ec398d1f Mon Sep 17 00:00:00 2001 From: Andy2 Date: Wed, 7 Jul 2010 18:59:48 -0700 Subject: [PATCH 1/2] fix crash when empty string given on ctrl port --- xwords4/relay/ctrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xwords4/relay/ctrl.cpp b/xwords4/relay/ctrl.cpp index dfd8eda4b..76cb50bd3 100644 --- a/xwords4/relay/ctrl.cpp +++ b/xwords4/relay/ctrl.cpp @@ -522,7 +522,7 @@ cmd_lock( int socket, const char** args ) static bool cmd_help( int socket, const char** args ) { - if ( 0 == strcmp( "help", args[1] ) ) { + if ( NULL != args[1] && 0 == strcmp( "help", args[1] ) ) { print_to_sock( socket, true, "* %s -- prints this", args[0] ); } else { From 41f8f574b19f25e6a6ab8d64331c45c0a5ff473a Mon Sep 17 00:00:00 2001 From: Andy2 Date: Wed, 7 Jul 2010 20:26:25 -0700 Subject: [PATCH 2/2] use git describe for version info/stamp --- xwords4/relay/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xwords4/relay/Makefile b/xwords4/relay/Makefile index 7991ed17c..b0241fea5 100644 --- a/xwords4/relay/Makefile +++ b/xwords4/relay/Makefile @@ -32,7 +32,7 @@ SRC = xwrelay.cpp \ # STATIC ?= -static GITINFO = gitversion.txt -HASH=$(shell ../scripts/gitversion.sh) +HASH=$(shell git describe) OBJ = $(patsubst %.cpp,%.o,$(SRC)) #LDFLAGS += -pthread -g -lmcheck $(STATIC)