diff options
author | Yusuke Sato <yusuke-sato@apn.alpine.co.jp> | 2016-02-29 23:28:59 +0100 |
---|---|---|
committer | Alexander Wenzel <Alexander.AW.Wenzel@bmw.de> | 2016-09-23 15:37:25 +0200 |
commit | 7450ba81004d0f073175d12762f37ad845a16177 (patch) | |
tree | 64d2c909449a19a4ce954a72ec420357653719c3 | |
parent | 52d455f03f81a84bc9454e526591d37407cdc4d1 (diff) | |
download | DLT-daemon-7450ba81004d0f073175d12762f37ad845a16177.tar.gz |
Add: Configuration of option of get log info response during context registration
Option of get log info response during context registration was fixed to 7.
This modification enables to change that option.
Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
Change-Id: Ia75f15cdb33e0bffd77c5ba71a1960e820714e61
-rw-r--r-- | src/daemon/dlt-daemon.c | 8 | ||||
-rw-r--r-- | src/daemon/dlt-daemon.h | 1 | ||||
-rw-r--r-- | src/daemon/dlt.conf | 4 |
3 files changed, 12 insertions, 1 deletions
diff --git a/src/daemon/dlt-daemon.c b/src/daemon/dlt-daemon.c index f075b09..28ed4aa 100644 --- a/src/daemon/dlt-daemon.c +++ b/src/daemon/dlt-daemon.c @@ -249,6 +249,7 @@ int option_file_parser(DltDaemonLocal *daemon_local) DLT_DAEMON_DEFAULT_CTRL_SOCK_PATH, sizeof(daemon_local->flags.ctrlSockPath) - 1); daemon_local->flags.gatewayMode = 0; + daemon_local->flags.autoResponseGetLogInfoOption = 7; daemon_local->flags.contextLogLevel = DLT_LOG_INFO; daemon_local->flags.contextTraceStatus = DLT_TRACE_STATUS_OFF; daemon_local->flags.enforceContextLLAndTS = 0; /* default is off */ @@ -325,6 +326,11 @@ int option_file_parser(DltDaemonLocal *daemon_local) daemon_local->flags.rflag = atoi(value); //printf("Option: %s=%s\n",token,value); } + else if(strcmp(token,"SendContextRegistrationOption")==0) + { + daemon_local->flags.autoResponseGetLogInfoOption = atoi(value); + //printf("Option: %s=%s\n",token,value); + } else if(strcmp(token,"SendMessageTime")==0) { daemon_local->flags.sendMessageTime = atoi(value); @@ -2317,7 +2323,7 @@ int dlt_daemon_process_user_message_register_context(DltDaemon *daemon, req = (DltServiceGetLogInfoRequest*) msg.databuffer; req->service_id = DLT_SERVICE_ID_GET_LOG_INFO; - req->options = 7; + req->options = daemon_local->flags.autoResponseGetLogInfoOption; dlt_set_id(req->apid, userctxt.apid); dlt_set_id(req->ctid, userctxt.ctid); dlt_set_id(req->com,"remo"); diff --git a/src/daemon/dlt-daemon.h b/src/daemon/dlt-daemon.h index 947b892..a20af75 100644 --- a/src/daemon/dlt-daemon.h +++ b/src/daemon/dlt-daemon.h @@ -124,6 +124,7 @@ typedef struct unsigned int port; /**< port number */ char ctrlSockPath[DLT_DAEMON_FLAG_MAX]; /**< Path to Control socket */ int gatewayMode; /**< (Boolean) Gateway Mode */ + int autoResponseGetLogInfoOption; /**< (int) The Option of automatic get log info response during context registration. (Default: 7)*/ int contextLogLevel; /**< (int) log level sent to context if registered with default log-level or if enforced*/ int contextTraceStatus; /**< (int) trace status sent to context if registered with default trace status or if enforced*/ int enforceContextLLAndTS; /**< (Boolean) Enforce log-level, trace-status not to exceed contextLogLevel, contextTraceStatus */ diff --git a/src/daemon/dlt.conf b/src/daemon/dlt.conf index 4d8561c..383cbab 100644 --- a/src/daemon/dlt.conf +++ b/src/daemon/dlt.conf @@ -18,6 +18,10 @@ # Send automatic get log info response during context registration SendContextRegistration = 1 +# Option of get log info response during context registration (Default: 7) +# Apid and Ctid Only = 3, with LogLevel = 4, with TraceStatus = 5, with LL and TS = 6, with LL, TS, and Description = 7 +# SendContextRegistrationOption = 7 + # Send automatic time packets every second if client is connected (Default: 0) # SendMessageTime = 0 |