summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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;
}