X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fmain.c;h=9586bb564f6cb88f579b82768304318ac1720292;hb=b55efc33fb8df8b0518570b2584b6da9abb3221b;hp=a86de1c5a79c50eff2ef08f64c64c49d17b1719c;hpb=6458b6eb67426974e9a3b8eed1f5620f0de0efc5;p=src%2Fapp-framework-binder.git diff --git a/src/main.c b/src/main.c index a86de1c5..9586bb56 100644 --- a/src/main.c +++ b/src/main.c @@ -72,6 +72,7 @@ static sigjmp_buf restartpoint; // context save for set/longjmp #define SET_SMACK 140 #define SET_PLUGINS 141 + #define SET_APITIMEOUT 142 #define DISPLAY_VERSION 150 #define DISPLAY_HELP 151 @@ -90,6 +91,7 @@ static AFB_options cliOptions [] = { {SET_ROOT_DIR ,1,"rootdir" , "HTTP Root Directory [default $HOME/.AFB"}, {SET_ROOT_BASE ,1,"rootbase" , "Angular Base Root URL [default /opa"}, {SET_ROOT_API ,1,"rootapi" , "HTML Root API URL [default /api"}, + {SET_APITIMEOUT ,1,"apitimeout" , "Plugin API timeout in seconds [default 10]"}, {SET_CACHE_TO ,1,"cache-eol" , "Client cache end of live [default 3600s]"}, {SET_cardid ,1,"setuid" , "Change user id [default don't change]"}, @@ -301,6 +303,11 @@ int main(int argc, char *argv[]) { if (optarg == 0) goto needValueForOption; if (!sscanf (optarg, "%d", &cliconfig.httpdPort)) goto notAnInteger; break; + + case SET_APITIMEOUT: + if (optarg == 0) goto needValueForOption; + if (!sscanf (optarg, "%d", &cliconfig.apiTimeout)) goto notAnInteger; + break; case SET_ROOT_DIR: if (optarg == 0) goto needValueForOption;