From 29d04383ea3e499840aae0220da700a27cce26e4 Mon Sep 17 00:00:00 2001 From: José Bollo Date: Wed, 23 Mar 2016 13:05:25 +0100 Subject: removes save option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I2a935739985574f9463bf25884254a4ace3b4938 Signed-off-by: José Bollo --- include/local-def.h | 2 -- src/main.c | 16 ---------------- 2 files changed, 18 deletions(-) diff --git a/include/local-def.h b/include/local-def.h index 44f21424..df4ddb23 100644 --- a/include/local-def.h +++ b/include/local-def.h @@ -242,11 +242,9 @@ typedef struct { int killPrevious; int background; // run in backround mode int foreground; // run in forground mode - int configsave; // Save config on disk on start char *cacheTimeout; // http require timeout to be a string struct MHD_Daemon *httpd; // anonymous structure for httpd handler int fakemod; // respond to GET/POST request without interacting with sndboard - int forceexit; // when autoconfig from script force exit before starting server int readyfd; // a #fd to signal when ready to serve AFB_plugin **plugins; // pointer to REST/API plugins magic_t magic; // Mime type file magic lib diff --git a/src/main.c b/src/main.c index 40f28c13..d19f7e0f 100644 --- a/src/main.c +++ b/src/main.c @@ -116,8 +116,6 @@ static AFB_options cliOptions [] = { {SET_PID_FILE ,1,"pidfile" , "PID file path [default none]"}, {SET_SESSION_DIR ,1,"sessiondir" , "Sessions file path [default rootdir/sessions]"}, {SET_CONFIG_FILE ,1,"config" , "Config Filename [default rootdir/sessions/configs/default.AFB]"}, - {SET_CONFIG_SAVE ,0,"save" , "Save config on disk [default no]"}, - {SET_CONFIG_EXIT ,0,"saveonly" , "Save config on disk and then exit"}, {SET_LDPATH ,1,"ldpaths" , "Load Plugins from dir1:dir2:... [default = PLUGIN_INSTALL_DIR"}, {SET_AUTH_TOKEN ,1,"token" , "Initial Secret [default=no-session, --token="" for session without authentication]"}, @@ -394,17 +392,6 @@ static void parse_arguments(int argc, char *argv[], AFB_session *session) if (!sscanf (optarg, "%d", &cliconfig.cacheTimeout)) goto notAnInteger; break; - case SET_CONFIG_EXIT: - if (optarg != 0) goto noValueForOption; - session->configsave = 1; - session->forceexit = 1; - break; - - case SET_CONFIG_SAVE: - if (optarg != 0) goto noValueForOption; - session->configsave = 1; - break; - case SET_USERID: if (optarg == 0) goto needValueForOption; cliconfig.setuid = optarg; @@ -559,9 +546,6 @@ int main(int argc, char *argv[]) { // ------------------ Finaly Process Commands ----------------------------- // if --save then store config on disk upfront - if (session->configsave) configStoreFile (session); - if (session->forceexit) exit (0); - if (session->config->setuid) { int err; struct passwd *passwd; -- cgit 1.2.3-korg