Mercurial > libpst
comparison src/readpst.c @ 274:ebcfb23390a4
add some debug code
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Sun, 22 May 2011 12:16:27 -0700 |
parents | 3f323c867cb4 |
children | e02c81c39232 |
comparison
equal
deleted
inserted
replaced
273:d57dd13158ef | 274:ebcfb23390a4 |
---|---|
1357 has_from = has_subject = has_to = has_cc = has_date = has_msgid = 0; | 1357 has_from = has_subject = has_to = has_cc = has_date = has_msgid = 0; |
1358 DEBUG_ENT("write_normal_email"); | 1358 DEBUG_ENT("write_normal_email"); |
1359 | 1359 |
1360 pst_convert_utf8_null(item, &item->email->header); | 1360 pst_convert_utf8_null(item, &item->email->header); |
1361 headers = (item->email->header.str) ? item->email->header.str : *extra_mime_headers; | 1361 headers = (item->email->header.str) ? item->email->header.str : *extra_mime_headers; |
1362 if (*extra_mime_headers && item->email->header.str) { | |
1363 // we have both extra mime headers from outer message, | |
1364 // and also our own set of headers | |
1365 DEBUG_INFO(("Double headers! outer set = \n%s\n\nDouble headers! inner set = \n%s\n", *extra_mime_headers, item->email->header.str)); | |
1366 } | |
1362 | 1367 |
1363 // setup default body character set and report type | 1368 // setup default body character set and report type |
1364 strncpy(body_charset, pst_default_charset(item, sizeof(buffer_charset), buffer_charset), sizeof(body_charset)); | 1369 strncpy(body_charset, pst_default_charset(item, sizeof(buffer_charset), buffer_charset), sizeof(body_charset)); |
1365 body_charset[sizeof(body_charset)-1] = '\0'; | 1370 body_charset[sizeof(body_charset)-1] = '\0'; |
1366 strncpy(body_report, "delivery-status", sizeof(body_report)); | 1371 strncpy(body_report, "delivery-status", sizeof(body_report)); |
1385 if (c_time) | 1390 if (c_time) |
1386 c_time[strlen(c_time)-1] = '\0'; //remove end \n | 1391 c_time[strlen(c_time)-1] = '\0'; //remove end \n |
1387 else | 1392 else |
1388 c_time = "Fri Dec 28 12:06:21 2001"; | 1393 c_time = "Fri Dec 28 12:06:21 2001"; |
1389 } else | 1394 } else |
1390 c_time= "Fri Dec 28 12:06:21 2001"; | 1395 c_time = "Fri Dec 28 12:06:21 2001"; |
1391 | 1396 |
1392 // create our MIME boundaries here. | 1397 // create our MIME boundaries here. |
1393 snprintf(boundary, sizeof(boundary), "--boundary-LibPST-iamunique-%i_-_-", rand()); | 1398 snprintf(boundary, sizeof(boundary), "--boundary-LibPST-iamunique-%i_-_-", rand()); |
1394 snprintf(altboundary, sizeof(altboundary), "alt-%s", boundary); | 1399 snprintf(altboundary, sizeof(altboundary), "alt-%s", boundary); |
1395 | 1400 |