diff pst2ldif.cpp @ 12:3f627519a92d stable-0-5-2

properly ignore (second block zero) errors. that will just drop some unknown attachments, but the rest of the data is still found
author carl
date Sat, 18 Feb 2006 09:56:00 -0800
parents bf12a9d4524c
children 80ae7e5cb562
line wrap: on
line diff
--- a/pst2ldif.cpp	Fri Feb 17 22:48:32 2006 -0800
+++ b/pst2ldif.cpp	Sat Feb 18 09:56:00 2006 -0800
@@ -136,6 +136,7 @@
 	while (d_ptr) {
 		if (d_ptr->desc) {
 			item = (pst_item*)_pst_parse_item(&pstfile, d_ptr);
+			DEBUG_INFO(("item pointer is %p\n", item));
 			if (item) {
 				if (item->message_store) {
 					// there should only be one message_store, and we have already done it
@@ -346,6 +347,9 @@
 						}
 					}
 				}
+				else {
+					DEBUG_INFO(("item is not a contact\n"));
+				}
 			}
 			_pst_freeItem(item);
 		}
@@ -409,11 +413,13 @@
 	d_ptr = pstfile.d_head; // first record is main record
 	item  = (pst_item*)_pst_parse_item(&pstfile, d_ptr);
 	if (!item || !item->message_store) {
+		DEBUG_RET();
 		DIE(("main: Could not get root record\n"));
 	}
 
 	d_ptr = pst_getTopOfFolders(&pstfile, item);
 	if (!d_ptr) {
+		DEBUG_RET();
 		DIE(("Top of folders record not found. Cannot continue\n"));
 	}
 
@@ -429,6 +435,7 @@
 
 	process(d_ptr->child);	// do the children of TOPF
 	pst_close(&pstfile);
+	DEBUG_RET();
 	return 0;
 }