X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafs-config.c;fp=src%2Fafs-config.c;h=71d5ab74714b4ef8d7a305269dbd7852567b0afc;hb=9dfc52b10b075bf538e9774176178007eec8e48a;hp=eee4ccc020ee1e12e5f9921091e72ef36f573a1e;hpb=cab05ba72abeb335b456b0820e053c94b91986e7;p=src%2Fapp-framework-binder.git diff --git a/src/afs-config.c b/src/afs-config.c index eee4ccc0..71d5ab74 100644 --- a/src/afs-config.c +++ b/src/afs-config.c @@ -71,6 +71,7 @@ #define SET_NAME 'n' #define SET_TCP_PORT 'p' #define SET_QUIET 'q' +#define WS_SERVICE 's' #define SET_AUTH_TOKEN 't' #define SET_UPLOAD_DIR 'u' #define DISPLAY_VERSION 'V' @@ -78,7 +79,7 @@ #define SET_WORK_DIR 'w' const char shortopts[] = - "hn:p:qrt:u:Vvw:" + "hn:p:qrs:t:u:Vvw:" ; // Command line structure hold cli --command + help text @@ -113,6 +114,7 @@ static AFB_options cliOptions[] = { {SET_AUTH_TOKEN, 1, "token", "Initial Secret [default=" AFS_SUPERVISOR_TOKEN ", use --token="" to allow any token]"}, + {WS_SERVICE, 1, "ws-server", "Povide supervisor as websocket"}, {DISPLAY_VERSION, 0, "version", "Display version and copyright"}, {DISPLAY_HELP, 0, "help", "Display this help"}, @@ -324,6 +326,10 @@ static void parse_arguments(int argc, char **argv, struct afs_config *config) config->name = argvalstr(optc); break; + case WS_SERVICE: + config->ws_server = argvalstr(optc); + break; + case DISPLAY_VERSION: noarg(optc); printVersion(stdout); @@ -401,6 +407,7 @@ void afs_config_dump(struct afs_config *config) S(uploaddir) S(token) S(name) + S(ws_server) D(httpdPort) D(cacheTimeout)