Merge branch 'master' into IOMultiplexer
authorpk910 <philipp@zoelle1.de>
Wed, 22 Aug 2012 00:25:23 +0000 (02:25 +0200)
committerpk910 <philipp@zoelle1.de>
Wed, 22 Aug 2012 00:25:23 +0000 (02:25 +0200)
Conflicts:
src/signal.c

src/signal.c
src/version.sh

index d427ae2e9510884b927b02f4005899d2d37ede6d..175f61150db18ba33863ba979eef4d3953be9eef 100644 (file)
@@ -87,7 +87,7 @@ static void sigcrash(int signum) {
     for(bot = getBots(SOCKET_FLAG_READY, NULL); bot; bot = getBots(SOCKET_FLAG_READY, bot)) {
         if((bot->flags & SOCKET_FLAG_CONNECTED)) {
             iohandler_close(bot->iofd);
-            bot->flags &= SOCKET_FLAG_CONNECTED;
+            bot->flags &= ~(SOCKET_FLAG_CONNECTED | SOCKET_FLAG_READY);
             bot->iofd = NULL;
         }
     }
index 64c77305eea6a334a50e7ea5c7583b9dcdce9195..27b758921e4920ffdabf993f82c4141794046cf1 100644 (file)
@@ -19,18 +19,14 @@ else \
 
 codelines=`find . -type f -regex '\./.*\.h' -or -regex '\./.*\.c' |xargs cat|wc -l`
 
-svn_revision=`svn info | grep Revision | grep -o -E '[0-9]+'`
-git_commitcount=0
-if test "x$svn_revision" = "x" ; then
-  svn_revision=`git log -n 1 --pretty="format:%h"`
-  if test "x$svn_revision" = "x" ; then
-    svn_revision="0"
-  else
-    git_commitcount=`git log --pretty=oneline --no-merges --first-parent | wc -l | sed "s/[ \t]//g"`
-    svn_revision="git-$git_commitcount-$svn_revision"
-  fi
+
+git_revision=`git rev-list -n 1 --pretty="format:%h" --header master | grep '^[0-9a-f]*$'`
+if test "x$git_revision" = "x" ; then
+  git_revision="0"
+  git_commitcount="0"
 else
-  svn_revision="svn-$svn_revision"
+  git_commitcount=`git rev-list --oneline --header master | wc -l | sed "s/[ \t]//g"`
+  git_revision="git-$git_commitcount-$svn_revision"
 fi
 
 
@@ -57,7 +53,7 @@ fi
 
 const char *compilation = "$compilation";
 const char *creation = "$creation";
-const char *revision = "$svn_revision";
+const char *revision = "$git_revision";
 const char *codelines = "$codelines";
 
 const int patchlevel = ($git_commitcount ? ($git_commitcount - VERSION_PATCHLEVEL) : 0);