diff options
author | flaviojs <flaviojs@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-06-16 10:22:35 +0000 |
---|---|---|
committer | flaviojs <flaviojs@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-06-16 10:22:35 +0000 |
commit | e054cbbdb28a9b555faafd689282140c01d55b3e (patch) | |
tree | a0a637c944d902df0086900009a644c5b84d39e2 /src/common/core.h | |
parent | 83c890478d5588179ffd81b29a95d4bafd0fb118 (diff) | |
download | hercules-e054cbbdb28a9b555faafd689282140c01d55b3e.tar.gz hercules-e054cbbdb28a9b555faafd689282140c01d55b3e.tar.bz2 hercules-e054cbbdb28a9b555faafd689282140c01d55b3e.tar.xz hercules-e054cbbdb28a9b555faafd689282140c01d55b3e.zip |
* Merges from charmerge:
- Added DBMap::exists. (r14090)
- Added sv_parse_next, a stepped version of sv_parse (delim-separated parser). (r14100 r14104)
- Added missing fd check to do_close. (r14145)
- Normalized, refactored and restructured some code (in preparation for shutdown/reconnect code). (r14145 r14150)
- Changed the char select request code to allow the char-server to reject it. (player in map-server trying to go to char select) (r14150)
- Added shutdown support to the servers. (incomplete) (r14152)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14851 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/core.h')
-rw-r--r-- | src/common/core.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/common/core.h b/src/common/core.h index fc4af3e3e..beb72d080 100644 --- a/src/common/core.h +++ b/src/common/core.h @@ -7,6 +7,7 @@ extern int arg_c; extern char **arg_v; +/// @see E_CORE_ST extern int runflag; extern char *SERVER_NAME; extern char SERVER_TYPE; @@ -18,4 +19,16 @@ extern void set_server_type(void); extern void do_abort(void); extern void do_final(void); +/// The main loop continues until runflag is CORE_ST_STOP +enum E_CORE_ST +{ + CORE_ST_STOP = 0, + CORE_ST_RUN, + CORE_ST_LAST +}; + +/// Called when a terminate signal is received. (Ctrl+C pressed) +/// If NULL, runflag is set to CORE_ST_STOP instead. +extern void (*shutdown_callback)(void); + #endif /* _CORE_H_ */ |