Log po filenames instead of ids 23/296723/5
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Thu, 3 Aug 2023 10:07:45 +0000 (12:07 +0200)
committerDong Sun Lee <ds73.lee@samsung.com>
Fri, 11 Aug 2023 00:27:42 +0000 (00:27 +0000)
Persistent object ids are binary and thus unreadable. Use their hex
representation from the filename instead.

Change-Id: I03a780ee7ddccfd96eaae249a5e7c1d6e2ae4a81

ssflib/src/ssf_storage.cpp

index ebbbf57199ca9777ad57d4fd9e8e3491d9d04961..039fe9c27a3051856e06e6527c70bb33cb3c376c 100644 (file)
@@ -1298,10 +1298,13 @@ void rem_from_po_list(persistent_object* po) {
 po_user* get_po_user_from_po_list(uint32_t storageID, const void* objectID,
     size_t objectIDLen)
 {
-       MSG("=====To find PO %d %s=====", storageID, (char *)objectID);
+       char file_name[PO_FILE_NAME_MAX_LEN + 1];
+       derive_po_file_name(objectID, objectIDLen, file_name);
+       MSG("=====To find PO %d %s=====", storageID, file_name);
+
        po_list_node* node = g_po_list.next;
        while (node != NULL) {
-               MSG("======PO list : %d %s  =====", node->po->storage_id, node->po->object_id);
+               MSG("======PO list : %d %s  =====", node->po->storage_id, node->po->po_file.file_name);
                if(node->po->storage_id == storageID &&
                        strncmp(node->po->object_id, (char*)objectID, objectIDLen) == 0 &&
                        node->po->share_info.usr_info != NULL)