summaryrefslogtreecommitdiff
path: root/src/offlinelogstorage/dlt_offline_logstorage.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.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.h')
-rw-r--r--src/offlinelogstorage/dlt_offline_logstorage.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/offlinelogstorage/dlt_offline_logstorage.h b/src/offlinelogstorage/dlt_offline_logstorage.h
index c2160b5..e28e535 100644
--- a/src/offlinelogstorage/dlt_offline_logstorage.h
+++ b/src/offlinelogstorage/dlt_offline_logstorage.h
@@ -60,7 +60,7 @@
#include "dlt_config_file_parser.h"
#define DLT_OFFLINE_LOGSTORAGE_MAXIDS 100 /* Maximum entries for each apids and ctids */
-#define DLT_OFFLINE_LOGSTORAGE_MAX_POSSIBLE_CONFIGS 7 /* max number of possible filters when searching for */
+#define DLT_OFFLINE_LOGSTORAGE_MAX_POSSIBLE_KEYS 7 /* Max number of possible keys when searching for */
#define DLT_OFFLINE_LOGSTORAGE_INIT_DONE 1 /* For device configuration status */
#define DLT_OFFLINE_LOGSTORAGE_DEVICE_CONNECTED 1
@@ -191,7 +191,8 @@ typedef struct DltLogStorageFilterList DltLogStorageFilterList;
struct DltLogStorageFilterList
{
- char *key; /* Key to find data */
+ char *key_list; /* List of key */
+ int num_keys; /* Number of keys */
DltLogStorageFilterConfig *data; /* Filter data */
DltLogStorageFilterList *next; /* Pointer to next */
};
@@ -199,9 +200,8 @@ struct DltLogStorageFilterList
typedef struct
{
DltLogStorageFilterList *config_list; /* List of all filters */
- DltLogStorageUserConfig uconfig; /* User configurations for file name*/
- int num_configs; /* Number of configs */
- int num_filter_keys; /* Number of keys */
+ DltLogStorageUserConfig uconfig; /* User configurations for file name*/
+ int num_configs; /* Number of configs */
char device_mount_point[DLT_MOUNT_PATH_MAX + 1]; /* Device mount path */
unsigned int connection_type; /* Type of connection */
unsigned int config_status; /* Status of configuration */