1
0
Fork 0
mirror of https://github.com/kakwa/uts-server synced 2025-07-04 20:47:09 +02:00

passing the launch working dir to the configuration handler

as many configuration paths can be relative to the execution working
directory, this directory is recorded at launch time, and the set_params
function does a chdir(<start work dir>); <load conf>; chdir("/") when
it's called.
This commit is contained in:
kakwa 2016-09-01 07:59:02 +02:00
parent 93ead7ee99
commit 6e687f2fe2
5 changed files with 23 additions and 12 deletions

View file

@ -1,4 +1,4 @@
#include <stdbool.h>
#include "utils.h"
int http_server_start(char *conffile, bool stdout_dbg);
int http_server_start(char *conffile, char *conf_wd,bool stdout_dbg);

View file

@ -4,6 +4,6 @@ void skeleton_daemon();
void uts_logger(rfc3161_context *ct, int priority, char *fmt, ...);
void log_hex(rfc3161_context *ct, int priority, char *id,
unsigned char *content, int content_length);
int set_params(rfc3161_context *ct, char *conf_file);
int set_params(rfc3161_context *ct, char *conf_file, char *conf_wd);
int g_uts_sig_up;
int g_uts_sig;