comparison src/libpst.c @ 267:3fa737c05322

adding more debug code
author Carl Byington <carl@five-ten-sg.com>
date Sun, 17 Apr 2011 17:17:35 -0700
parents 3f323c867cb4
children 8dcfef53a4f3
comparison
equal deleted inserted replaced
266:3f323c867cb4 267:3fa737c05322
2149 while (list) { 2149 while (list) {
2150 int32_t x; 2150 int32_t x;
2151 char time_buffer[30]; 2151 char time_buffer[30];
2152 for (x=0; x<list->count_elements; x++) { 2152 for (x=0; x<list->count_elements; x++) {
2153 int32_t t; 2153 int32_t t;
2154 uint32_t ut;
2154 DEBUG_INFO(("#%d - mapi-id: %#x type: %#x length: %#x\n", x, list->elements[x]->mapi_id, list->elements[x]->type, list->elements[x]->size)); 2155 DEBUG_INFO(("#%d - mapi-id: %#x type: %#x length: %#x\n", x, list->elements[x]->mapi_id, list->elements[x]->type, list->elements[x]->size));
2155 2156
2156 switch (list->elements[x]->mapi_id) { 2157 switch (list->elements[x]->mapi_id) {
2157 case PST_ATTRIB_HEADER: // CUSTOM attribute for saying the Extra Headers 2158 case PST_ATTRIB_HEADER: // CUSTOM attribute for saying the Extra Headers
2158 if (list->elements[x]->extra) { 2159 if (list->elements[x]->extra) {
2464 LIST_COPY_EMAIL_BOOL("Compressed RTF in Sync", item->email->rtf_in_sync); 2465 LIST_COPY_EMAIL_BOOL("Compressed RTF in Sync", item->email->rtf_in_sync);
2465 break; 2466 break;
2466 case 0x0E20: // PR_ATTACH_SIZE binary Attachment data in record 2467 case 0x0E20: // PR_ATTACH_SIZE binary Attachment data in record
2467 NULL_CHECK(attach); 2468 NULL_CHECK(attach);
2468 LIST_COPY_INT32("Attachment Size", t); 2469 LIST_COPY_INT32("Attachment Size", t);
2469 attach->data.size = (size_t)t; 2470 if (attach->data.data || attach->data.size) {
2471 DEBUG_INFO(("already have data %#"PRIxPTR" size %#"PRIx64"\n", attach->data.data, attach->data.size));
2472 }
2473 else {
2474 attach->data.size = (size_t)t;
2475 }
2470 break; 2476 break;
2471 case 0x0FF9: // PR_RECORD_KEY Record Header 1 2477 case 0x0FF9: // PR_RECORD_KEY Record Header 1
2472 LIST_COPY_BIN(item->record_key); 2478 LIST_COPY_BIN(item->record_key);
2473 DEBUG_INFO(("Record Key\n")); 2479 DEBUG_INFO(("Record Key\n"));
2474 DEBUG_HEXDUMP(item->record_key.data, item->record_key.size); 2480 DEBUG_HEXDUMP(item->record_key.data, item->record_key.size);
2890 case 0x65E3: // PR_PREDECESSOR_CHANGE_LIST 2896 case 0x65E3: // PR_PREDECESSOR_CHANGE_LIST
2891 LIST_COPY_BIN(item->predecessor_change); 2897 LIST_COPY_BIN(item->predecessor_change);
2892 DEBUG_INFO(("Predecessor Change\n")); 2898 DEBUG_INFO(("Predecessor Change\n"));
2893 DEBUG_HEXDUMP(item->predecessor_change.data, item->predecessor_change.size); 2899 DEBUG_HEXDUMP(item->predecessor_change.data, item->predecessor_change.size);
2894 break; 2900 break;
2895 case 0x67F2: // ID2 value of the attachments proper record 2901 case 0x67F2: // ID2 value of the attachment
2896 if (attach) { 2902 NULL_CHECK(attach);
2897 uint32_t tempid; 2903 LIST_COPY_INT32("Attachment ID2 value", ut);
2898 memcpy(&(tempid), list->elements[x]->data, sizeof(tempid)); 2904 attach->id2_val = ut;
2899 LE32_CPU(tempid);
2900 attach->id2_val = tempid;
2901 DEBUG_INFO(("Attachment ID2 value - %#"PRIx64"\n", attach->id2_val));
2902 } else {
2903 DEBUG_WARN(("NOT AN ATTACHMENT: %#x\n", list->elements[x]->mapi_id));
2904 }
2905 break; 2905 break;
2906 case 0x67FF: // Extra Property Identifier (Password CheckSum) 2906 case 0x67FF: // Extra Property Identifier (Password CheckSum)
2907 LIST_COPY_STORE_INT32("Password checksum", item->message_store->pwd_chksum); 2907 LIST_COPY_STORE_INT32("Password checksum", item->message_store->pwd_chksum);
2908 break; 2908 break;
2909 case 0x6F02: // Secure HTML Body 2909 case 0x6F02: // Secure HTML Body