comparison src/pst2ldif.cpp @ 46:b2a7f2e0926a

more fixes for 64 bit format
author carl
date Sat, 12 Jan 2008 15:20:53 -0800
parents 183ae993b9ad
children 034641c26ab9
comparison
equal deleted inserted replaced
45:b961bcdadd0e 46:b2a7f2e0926a
145 static void process(pst_desc_ll *d_ptr); 145 static void process(pst_desc_ll *d_ptr);
146 static void process(pst_desc_ll *d_ptr) { 146 static void process(pst_desc_ll *d_ptr) {
147 pst_item *item = NULL; 147 pst_item *item = NULL;
148 while (d_ptr) { 148 while (d_ptr) {
149 if (d_ptr->desc) { 149 if (d_ptr->desc) {
150 item = (pst_item*)_pst_parse_item(&pstfile, d_ptr); 150 item = (pst_item*)pst_parse_item(&pstfile, d_ptr);
151 DEBUG_INFO(("item pointer is %p\n", item)); 151 DEBUG_INFO(("item pointer is %p\n", item));
152 if (item) { 152 if (item) {
153 if (item->message_store) { 153 if (item->message_store) {
154 // there should only be one message_store, and we have already done it 154 // there should only be one message_store, and we have already done it
155 DIE(("main: A second message_store has been found. Sorry, this must be an error.\n")); 155 DIE(("main: A second message_store has been found. Sorry, this must be an error.\n"));
361 } 361 }
362 else { 362 else {
363 DEBUG_INFO(("item is not a contact\n")); 363 DEBUG_INFO(("item is not a contact\n"));
364 } 364 }
365 } 365 }
366 _pst_freeItem(item); 366 pst_freeItem(item);
367 } 367 }
368 d_ptr = d_ptr->next; 368 d_ptr = d_ptr->next;
369 } 369 }
370 } 370 }
371 371
429 RET_DERROR(pst_load_index(&pstfile), 2, ("Index Error\n")); 429 RET_DERROR(pst_load_index(&pstfile), 2, ("Index Error\n"));
430 430
431 pst_load_extended_attributes(&pstfile); 431 pst_load_extended_attributes(&pstfile);
432 432
433 d_ptr = pstfile.d_head; // first record is main record 433 d_ptr = pstfile.d_head; // first record is main record
434 item = (pst_item*)_pst_parse_item(&pstfile, d_ptr); 434 item = (pst_item*)pst_parse_item(&pstfile, d_ptr);
435 if (!item || !item->message_store) { 435 if (!item || !item->message_store) {
436 DEBUG_RET(); 436 DEBUG_RET();
437 DIE(("main: Could not get root record\n")); 437 DIE(("main: Could not get root record\n"));
438 } 438 }
439 439
441 if (!d_ptr) { 441 if (!d_ptr) {
442 DEBUG_RET(); 442 DEBUG_RET();
443 DIE(("Top of folders record not found. Cannot continue\n")); 443 DIE(("Top of folders record not found. Cannot continue\n"));
444 } 444 }
445 445
446 _pst_freeItem(item); 446 pst_freeItem(item);
447 447
448 // write the ldap header 448 // write the ldap header
449 printf("dn: %s\n", ldap_base); 449 printf("dn: %s\n", ldap_base);
450 printf("o: %s\n", ldap_org); 450 printf("o: %s\n", ldap_org);
451 printf("objectClass: organization\n\n"); 451 printf("objectClass: organization\n\n");