summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-12-15 01:13:25 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-12-15 01:13:25 +0000
commit2a56d9f154580b5bce78a5c382b0eef7e36751c9 (patch)
treee904020d91d4879d0b2eb2a022d08c54a76d3077
parent4c6f057f3d40bd7aa8e7d65e672ade0ee26c4aa9 (diff)
downloadhercules-2a56d9f154580b5bce78a5c382b0eef7e36751c9.tar.gz
hercules-2a56d9f154580b5bce78a5c382b0eef7e36751c9.tar.bz2
hercules-2a56d9f154580b5bce78a5c382b0eef7e36751c9.tar.xz
hercules-2a56d9f154580b5bce78a5c382b0eef7e36751c9.zip
BuildBot console report code
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15126 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--src/common/core.c3
-rw-r--r--src/common/core.h4
-rw-r--r--src/common/showmsg.c10
-rw-r--r--src/map/map.c4
4 files changed, 21 insertions, 0 deletions
diff --git a/src/common/core.c b/src/common/core.c
index 6bc91c947..7a6584898 100644
--- a/src/common/core.c
+++ b/src/common/core.c
@@ -28,6 +28,9 @@
/// Called when a terminate signal is received.
void (*shutdown_callback)(void) = NULL;
+#if defined(BUILDBOT)
+ bool buildbotflag;
+#endif
int runflag = CORE_ST_RUN;
int arg_c = 0;
diff --git a/src/common/core.h b/src/common/core.h
index beb72d080..6a3a0f056 100644
--- a/src/common/core.h
+++ b/src/common/core.h
@@ -7,6 +7,10 @@
extern int arg_c;
extern char **arg_v;
+#if defined(BUILDBOT)
+extern bool buildbotflag;
+#endif
+
/// @see E_CORE_ST
extern int runflag;
extern char *SERVER_NAME;
diff --git a/src/common/showmsg.c b/src/common/showmsg.c
index a69c73ba2..23d241505 100644
--- a/src/common/showmsg.c
+++ b/src/common/showmsg.c
@@ -687,6 +687,16 @@ int _vShowMessage(enum msg_type flag, const char *string, va_list ap)
ShowError("Empty string passed to _vShowMessage().\n");
return 1;
}
+ /**
+ * For the buildbot, these result in a EXIT_FAILURE from core.c when done reading the params.
+ **/
+#if defined(BUILDBOT)
+ if( flag == MSG_WARNING ||
+ flag == MSG_ERROR ||
+ flag == MSG_SQL ) {
+ bool buildbotflag = true;
+ }
+#endif
if(
( flag == MSG_WARNING && console_msg_log&1 ) ||
( ( flag == MSG_ERROR || flag == MSG_SQL ) && console_msg_log&2 ) ||
diff --git a/src/map/map.c b/src/map/map.c
index fe9b8b1df..1f8c066ad 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -3788,6 +3788,10 @@ int do_init(int argc, char *argv[])
shutdown_callback = do_shutdown;
runflag = MAPSERVER_ST_RUNNING;
}
+#if defined(BUILDBOT)
+ if( buildbotflag )
+ exit(EXIT_FAILURE);
+#endif
return 0;
}