Mercurial > libpst
comparison src/libpst.c @ 233:1d50ff3c5091
better rfc822 embedded message decoding
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Thu, 10 Sep 2009 22:49:24 -0700 |
parents | fe64279df92b |
children | 67b24d6a45d6 |
comparison
equal
deleted
inserted
replaced
232:f8dc1b7201ad | 233:1d50ff3c5091 |
---|---|
3284 if (!head) head = i2_ptr; | 3284 if (!head) head = i2_ptr; |
3285 if (tail) tail->next = i2_ptr; | 3285 if (tail) tail->next = i2_ptr; |
3286 tail = i2_ptr; | 3286 tail = i2_ptr; |
3287 if (id2_rec.child_id) { | 3287 if (id2_rec.child_id) { |
3288 if ((i_ptr = pst_getID(pf, id2_rec.child_id)) == NULL) { | 3288 if ((i_ptr = pst_getID(pf, id2_rec.child_id)) == NULL) { |
3289 DEBUG_WARN(("child id [%#"PRIi64"] not found\n", id2_rec.child_id)); | 3289 DEBUG_WARN(("child id [%#"PRIx64"] not found\n", id2_rec.child_id)); |
3290 } | 3290 } |
3291 else { | 3291 else { |
3292 i2_ptr->child = pst_build_id2(pf, i_ptr); | 3292 i2_ptr->child = pst_build_id2(pf, i_ptr); |
3293 } | 3293 } |
3294 } | 3294 } |
3883 */ | 3883 */ |
3884 size_t pst_ff_getIDblock_dec(pst_file *pf, uint64_t i_id, char **buf) { | 3884 size_t pst_ff_getIDblock_dec(pst_file *pf, uint64_t i_id, char **buf) { |
3885 size_t r; | 3885 size_t r; |
3886 int noenc = (int)(i_id & 2); // disable encryption | 3886 int noenc = (int)(i_id & 2); // disable encryption |
3887 DEBUG_ENT("pst_ff_getIDblock_dec"); | 3887 DEBUG_ENT("pst_ff_getIDblock_dec"); |
3888 DEBUG_INFO(("for id %#"PRIi64"\n", i_id)); | 3888 DEBUG_INFO(("for id %#"PRIx64"\n", i_id)); |
3889 r = pst_ff_getIDblock(pf, i_id, buf); | 3889 r = pst_ff_getIDblock(pf, i_id, buf); |
3890 if ((pf->encryption) && !(noenc)) { | 3890 if ((pf->encryption) && !(noenc)) { |
3891 (void)pst_decrypt(i_id, *buf, r, pf->encryption); | 3891 (void)pst_decrypt(i_id, *buf, r, pf->encryption); |
3892 } | 3892 } |
3893 DEBUG_HEXDUMPC(*buf, r, 16); | 3893 DEBUG_HEXDUMPC(*buf, r, 16); |
3927 pst_holder h = {buf, NULL, 0, 0, 0}; | 3927 pst_holder h = {buf, NULL, 0, 0, 0}; |
3928 DEBUG_ENT("pst_ff_getID2block"); | 3928 DEBUG_ENT("pst_ff_getID2block"); |
3929 ptr = pst_getID2(id2_head, id2); | 3929 ptr = pst_getID2(id2_head, id2); |
3930 | 3930 |
3931 if (!ptr) { | 3931 if (!ptr) { |
3932 DEBUG_WARN(("Cannot find id2 value %#"PRIi64"\n", id2)); | 3932 DEBUG_WARN(("Cannot find id2 value %#"PRIx64"\n", id2)); |
3933 DEBUG_RET(); | 3933 DEBUG_RET(); |
3934 return 0; | 3934 return 0; |
3935 } | 3935 } |
3936 ret = pst_ff_getID2data(pf, ptr->id, &h); | 3936 ret = pst_ff_getID2data(pf, ptr->id, &h); |
3937 DEBUG_RET(); | 3937 DEBUG_RET(); |