diff options
author | 2019-03-29 14:01:49 +0200 | |
---|---|---|
committer | 2019-03-29 14:45:44 +0200 | |
commit | de18684a25cdc1e310636c5f74d4e901881b5710 (patch) | |
tree | ecafbe8964adef080f9889a6d79790ffa11cb6cb /src/daemon/settings.c | |
parent | 05a93fcf7f541e2e969820efa35375190fdc3ce6 (diff) | |
download | usurpation-de18684a25cdc1e310636c5f74d4e901881b5710.tar.gz usurpation-de18684a25cdc1e310636c5f74d4e901881b5710.tar.bz2 usurpation-de18684a25cdc1e310636c5f74d4e901881b5710.zip |
daemon: style adjustment
Fix style inconsistencies and move port settings to settings.c.
Part of Ticket 3.
Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
Diffstat (limited to 'src/daemon/settings.c')
-rw-r--r-- | src/daemon/settings.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/daemon/settings.c b/src/daemon/settings.c index 6796ac1..3777f23 100644 --- a/src/daemon/settings.c +++ b/src/daemon/settings.c @@ -22,14 +22,25 @@ static struct settings { int daemonize; + unsigned short int port; } settings; -int setting_detach(void) -{ - /* should be, in this order: looking at options provided via command +/* TODO: should be, in this order: looking at options provided via command * line arguments, looking at at /etc/conf.d/usurpation.conf or - * using default. - * Right now just uses default. + * using default. Right now just uses defaults. */ +void settings_init(void) +{ + settings.daemonize =0; + settings.port = 6996 +} + +int setting_detach(void) +{ return settings.daemonize; } + +unsigned short int setting_port(void) +{ + return settings.port; +} |