From f0cd6d37a0cbf28a496dbee2a6d3223cc19a68ad Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Thu, 18 Mar 2004 17:52:28 +0000 Subject: [PATCH] Add version keyword --- src/configfile.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/configfile.c b/src/configfile.c index 639d8ef7..191ee68c 100644 --- a/src/configfile.c +++ b/src/configfile.c @@ -57,6 +57,7 @@ void config_emit_session_count(WS_CONNINFO *pwsc, void *value, char *arg); void config_emit_service_status(WS_CONNINFO *pwsc, void *value, char *arg); void config_emit_user(WS_CONNINFO *pwsc, void *value, char *arg); void config_emit_readonly(WS_CONNINFO *pwsc, void *value, char *arg); +void config_emit_version(WS_CONNINFO *pwsc, void *value, char *arg); void config_subst_stream(WS_CONNINFO *pwsc, int fd_src); int config_file_is_readonly(void); int config_mutex_lock(void); @@ -103,6 +104,7 @@ CONFIGELEMENT config_elements[] = { { 0,0,0,CONFIG_TYPE_SPECIAL,"service-status",(void*)NULL,config_emit_service_status }, { 0,0,0,CONFIG_TYPE_SPECIAL,"user",(void*)NULL,config_emit_user }, { 0,0,0,CONFIG_TYPE_SPECIAL,"readonly",(void*)NULL,config_emit_readonly }, + { 0,0,0,CONFIG_TYPE_SPECIAL,"version",(void*)NULL,config_emit_version }, { -1,1,0,CONFIG_TYPE_STRING,NULL,NULL,NULL } }; @@ -859,3 +861,12 @@ int config_get_next_session(void) { return session; } + +/* + * config_emit_version + * + * Thow out the version info + */ +void config_emit_version(WS_CONNINFO *pwsc, void *value, char *arg) { + ws_writefd(pwsc,"Version %s",VERSION); +}