summaryrefslogtreecommitdiff
path: root/src/offlinelogstorage/dlt_offline_logstorage_internal.h
diff options
context:
space:
mode:
authorVo Trung Chi <Chi.VoTrung@vn.bosch.com>2019-03-20 14:15:54 +0700
committerssugiura <39760799+ssugiura@users.noreply.github.com>2019-03-25 11:45:10 +0900
commitb7124c33826a53a1a66d3c6b7230ebd33735ab4a (patch)
treee4662aeab23132085d007e831f494aad14ff87c7 /src/offlinelogstorage/dlt_offline_logstorage_internal.h
parent92e704699867e3036ad5a3b84561541430d7493e (diff)
downloadDLT-daemon-b7124c33826a53a1a66d3c6b7230ebd33735ab4a.tar.gz
dlt_offline_logstorage: fix multiple file creation error (#85, #94)
Rootcause: The dlt-daemon rotates files for each key, but not for each [FILTER] because dlt-daemon creates the DltLogStorageFilterConfig for each key (CTXT: or APPID: or APPID:CTXTID) then added to the DltLogStorageFilterList. And each DltLogStorageFilterConfig has it's own records (The list of files that was recorded in the offline logstorage directory), that's why one [FILTER] might be has multiple records and then its lead to the problem. Solution: Instead of creating the DltLogStorageFilterConfig for each key, dlt-daemon will create the DltLogStorageFilterConfig for each [FILTER] and DltLogStorageFilterConfig has an information of all the keys in this [FILTER]. Signed-off-by: Vo Trung Chi <Chi.VoTrung@vn.bosch.com>
Diffstat (limited to 'src/offlinelogstorage/dlt_offline_logstorage_internal.h')
-rw-r--r--src/offlinelogstorage/dlt_offline_logstorage_internal.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/offlinelogstorage/dlt_offline_logstorage_internal.h b/src/offlinelogstorage/dlt_offline_logstorage_internal.h
index 11da0dd..9d1eaf7 100644
--- a/src/offlinelogstorage/dlt_offline_logstorage_internal.h
+++ b/src/offlinelogstorage/dlt_offline_logstorage_internal.h
@@ -56,11 +56,13 @@ DLT_STATIC int dlt_logstorage_list_destroy(DltLogStorageFilterList **list,
DLT_STATIC int dlt_logstorage_list_add_config(DltLogStorageFilterConfig *data,
DltLogStorageFilterConfig **listdata);
DLT_STATIC int dlt_logstorage_list_add(char *key,
+ int num_keys,
DltLogStorageFilterConfig *data,
DltLogStorageFilterList **list);
-DLT_STATIC void *dlt_logstorage_list_find(char *key,
- DltLogStorageFilterList **list);
+DLT_STATIC int dlt_logstorage_list_find(char *key,
+ DltLogStorageFilterList **list,
+ DltLogStorageFilterConfig **config);
DLT_STATIC int dlt_logstorage_count_ids(const char *str);