add config_path and version items to stats xml-rpc. Fixes ticket #33. Take 2. :)
This commit is contained in:
parent
bc2faaf75f
commit
f83f66130b
|
@ -1337,3 +1337,12 @@ int _conf_xml_dump(XMLSTRUCT *pxml, LL *pll, int sublevel, char *parent) {
|
|||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* get the filename of the currently runnig config file
|
||||
*
|
||||
* @returns path if it exists, or NULL if no config file opened
|
||||
*/
|
||||
char *conf_get_filename(void) {
|
||||
return conf_main_file;
|
||||
}
|
||||
|
|
|
@ -49,6 +49,8 @@ extern char *conf_implode(char *section, char *key, char *delimiter);
|
|||
extern int conf_get_array(char *section, char *key, char ***argvp);
|
||||
extern void conf_dispose_array(char **argv);
|
||||
|
||||
extern char *conf_get_filename(void);
|
||||
|
||||
/* FIXME: get enum functions and move to xml-rpc */
|
||||
#include "webserver.h"
|
||||
extern int conf_xml_dump(WS_CONNINFO *pwsc);
|
||||
|
|
|
@ -353,6 +353,8 @@ void xml_get_stats(WS_CONNINFO *pwsc) {
|
|||
|
||||
xml_push(pxml,"misc");
|
||||
xml_output(pxml,"writable_config","%d",conf_iswritable());
|
||||
xml_output(pxml,"config_path","%s",conf_get_filename());
|
||||
xml_output(pxml,"version","%s",VERSION);
|
||||
xml_pop(pxml); /* misc */
|
||||
|
||||
xml_pop(pxml); /* status */
|
||||
|
|
Loading…
Reference in New Issue