summaryrefslogtreecommitdiff
path: root/src/offlinelogstorage/dlt_offline_logstorage_behavior.h
diff options
context:
space:
mode:
authorSaya Sugiura <ssugiura@jp.adit-jv.com>2019-02-19 13:52:18 +0900
committerSaya Sugiura <ssugiura@jp.adit-jv.com>2019-06-18 17:22:09 +0900
commit711c9b884cf8f869511b31133dc9f7959c9ab843 (patch)
tree4fb8b154d916d43b4da890f2b0f1d623edbe8349 /src/offlinelogstorage/dlt_offline_logstorage_behavior.h
parentb049b408f7b15ef5ecdc71723812f43161d25ce8 (diff)
downloadDLT-daemon-711c9b884cf8f869511b31133dc9f7959c9ab843.tar.gz
Logstorage: Sync behavior bug fix
This commit fixes couple of unexpected behavior on Logstorage sync behavior. - A log file is created only if necessary to avoid creating an empty log file. - The cache is synced with the condition: 1) When the ring buffer is not wrapped around, the cache is synced from last sync offset to current offset 2) When the ring buffer is wrapped around for first time and current offset is smaller than last sync offset, the cache is synced from last sync offset to end sync offset, and then from beginning to current offset 3) Otherwise, the cache is synced from offset where the log message starts to end sync offset, and then from beginning to current offset Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
Diffstat (limited to 'src/offlinelogstorage/dlt_offline_logstorage_behavior.h')
-rw-r--r--src/offlinelogstorage/dlt_offline_logstorage_behavior.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/offlinelogstorage/dlt_offline_logstorage_behavior.h b/src/offlinelogstorage/dlt_offline_logstorage_behavior.h
index 68de0ab..431741b 100644
--- a/src/offlinelogstorage/dlt_offline_logstorage_behavior.h
+++ b/src/offlinelogstorage/dlt_offline_logstorage_behavior.h
@@ -58,6 +58,8 @@ int dlt_logstorage_prepare_on_msg(DltLogStorageFilterConfig *config,
char *dev_path,
int log_msg_size);
int dlt_logstorage_write_on_msg(DltLogStorageFilterConfig *config,
+ DltLogStorageUserConfig *file_config,
+ char *dev_path,
unsigned char *data1,
int size1,
unsigned char *data2,
@@ -79,6 +81,8 @@ int dlt_logstorage_prepare_msg_cache(DltLogStorageFilterConfig *config,
int log_msg_size);
int dlt_logstorage_write_msg_cache(DltLogStorageFilterConfig *config,
+ DltLogStorageUserConfig *file_config,
+ char *dev_path,
unsigned char *data1,
int size1,
unsigned char *data2,