summaryrefslogtreecommitdiff
path: root/conf/conf.h
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-01-16 17:40:26 +0000
committerMartin Mares <mj@ucw.cz>2000-01-16 17:40:26 +0000
commitbf8558bc9cab35f31bccd6a55e51f121370765c4 (patch)
treebf5396b1e4f7a9c2eff282a5f675e0cb59d1704e /conf/conf.h
parentebc793a5f552bb676014f771d81c074b7dd4345d (diff)
Converted shutdown to a kind of reconfiguration, it's no more handled
as a exception in protocol state machines. Introduced a `shutdown' CLI command. Killed few reconfiguration bugs.
Diffstat (limited to 'conf/conf.h')
-rw-r--r--conf/conf.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/conf/conf.h b/conf/conf.h
index 7d13ae9c..9fe133ee 100644
--- a/conf/conf.h
+++ b/conf/conf.h
@@ -27,6 +27,7 @@ struct config {
struct symbol **sym_hash; /* Lexer: symbol hash table */
struct symbol **sym_fallback; /* Lexer: fallback symbol hash table */
int obstacle_count; /* Number of items blocking freeing of this config */
+ int shutdown; /* This is a pseudo-config for daemon shutdown */
};
/* Please don't use these variables in protocols. Use proto_config->global instead. */
@@ -35,6 +36,8 @@ extern struct config *new_config; /* Configuration being parsed */
extern struct config *old_config; /* Old configuration when reconfiguration is in progress */
extern struct config *future_config; /* New config held here if recon requested during recon */
+extern int shutting_down;
+
struct config *config_alloc(byte *name);
int config_parse(struct config *);
int cli_parse(struct config *);
@@ -43,10 +46,12 @@ int config_commit(struct config *);
void cf_error(char *msg, ...) NORET;
void config_add_obstacle(struct config *);
void config_del_obstacle(struct config *);
+void order_shutdown(void);
#define CONF_DONE 0
#define CONF_PROGRESS 1
#define CONF_QUEUED 2
+#define CONF_SHUTDOWN 3
/* Pools */
@@ -98,5 +103,6 @@ int cf_parse(void);
void sysdep_preconfig(struct config *);
int sysdep_commit(struct config *, struct config *);
+void sysdep_shutdown_done(void);
#endif