Modify UID in Dump 57/223057/2
authorDewal Agarwal <d1.agarwal@samsung.com>
Wed, 22 Jan 2020 12:08:07 +0000 (17:38 +0530)
committerDewal Agarwal <d1.agarwal@samsung.com>
Wed, 22 Jan 2020 12:10:17 +0000 (12:10 +0000)
Change-Id: I67130ca5aabdf5f54ef3644d0398d546ceee0b31
Signed-off-by: Dewal Agarwal <d1.agarwal@samsung.com>
src/battery_dump/bd_history_item.c
src/battery_dump/bd_history_item_dummy.c

index e9e4474..d543863 100644 (file)
@@ -535,7 +535,7 @@ static int bd_get_and_print_uid_info_entry_from_dump(int fd)
        dump_p = g_string_sized_new(30);
        BM_CHECK_MEM_ALLOC(dump_p, {bm_set_free_gslist_appid_map(list); });
        dump_p = g_string_append(dump_p, TIZEN_DUMP_VERSION);
-       dump_p = g_string_append(dump_p, ",0,i,uid,0,tizen\n");
+       dump_p = g_string_append(dump_p, ",0,i,uid,1000,tizen\n");
        if (write(fd, dump_p->str, dump_p->len) < 0)
                _WARN("write error");
        g_free(dump_p->str);
@@ -547,7 +547,7 @@ static int bd_get_and_print_uid_info_entry_from_dump(int fd)
                dump_p = g_string_append(dump_p, ",i");
                dump_p = g_string_append(dump_p, ",uid,");
                appid_map_s *amap_data = (appid_map_s *)iter->data;
-               g_string_append_printf(dump_p, "%d,", amap_data->id);
+               g_string_append_printf(dump_p, "%d,", (amap_data->id+10000));
                gchar *temp_str = g_strdup(amap_data->AppId);
                g_string_append(dump_p, amap_data->AppId);
                dump_p = g_string_append(dump_p, "\n");
@@ -555,7 +555,7 @@ static int bd_get_and_print_uid_info_entry_from_dump(int fd)
                if (write(fd, dump_p->str, dump_p->len) < 0)
                        _WARN("write error");
                int *temp_id = (int *)malloc(4);
-               *temp_id = amap_data->id;
+               *temp_id = (amap_data->id + 10000);
                _DBG("Insert id %d, str %s, res %d", *temp_id, temp_str,
                g_hash_table_insert(app_map, temp_id, temp_str));
                g_free(dump_p->str);
index 276fbb9..53dc602 100644 (file)
@@ -72,7 +72,7 @@ static int create_event_tag(history_item_s* ts, int mask, int state, int on)
                GString *temp = ts->event_tag->string_info;
                temp = g_string_sized_new(30);
                BM_CHECK_MEM_ALLOC(temp, {});
-               ts->event_tag->uid = 0; //All events are associated with tizen
+               ts->event_tag->uid = 1000; //All events are associated with tizen
                if (state == 1) {
                        if (pool_idx_map_s1[mask] == -1) {
                                pool_idx_map_s1[mask] = pool_idx++;