Switch to unified view

a/src/internfile/mh_mbox.cpp b/src/internfile/mh_mbox.cpp
...
...
433
    }
433
    }
434
434
435
    off_t message_end = 0;
435
    off_t message_end = 0;
436
    bool iseof = false;
436
    bool iseof = false;
437
    bool hademptyline = true;
437
    bool hademptyline = true;
438
    string& msgtxt = m_metaData[cstr_content];
438
    string& msgtxt = m_metaData[cstr_dj_keycontent];
439
    msgtxt.erase();
439
    msgtxt.erase();
440
    line_type line;
440
    line_type line;
441
    for (;;) {
441
    for (;;) {
442
    message_end = ftello(fp);
442
    message_end = ftello(fp);
443
    if (!fgets(line, LL, fp)) {
443
    if (!fgets(line, LL, fp)) {
...
...
497
    LOGDEB2(("Message text: [%s]\n", msgtxt.c_str()));
497
    LOGDEB2(("Message text: [%s]\n", msgtxt.c_str()));
498
    char buf[20];
498
    char buf[20];
499
    // m_msgnum was incremented when hitting the next From_ or eof, so the data
499
    // m_msgnum was incremented when hitting the next From_ or eof, so the data
500
    // is for m_msgnum - 1
500
    // is for m_msgnum - 1
501
    sprintf(buf, "%d", m_msgnum - 1); 
501
    sprintf(buf, "%d", m_msgnum - 1); 
502
    m_metaData[cstr_ipath] = buf;
502
    m_metaData[cstr_dj_keyipath] = buf;
503
    m_metaData[cstr_mimetype] = "message/rfc822";
503
    m_metaData[cstr_dj_keymt] = "message/rfc822";
504
    if (iseof) {
504
    if (iseof) {
505
    LOGDEB2(("MimeHandlerMbox::next: eof hit\n"));
505
    LOGDEB2(("MimeHandlerMbox::next: eof hit\n"));
506
    m_havedoc = false;
506
    m_havedoc = false;
507
    if (!m_udi.empty() && storeoffsets) {
507
    if (!m_udi.empty() && storeoffsets) {
508
        o_mcache.put_offsets(m_config, m_udi, m_fsize, m_offsets);
508
        o_mcache.put_offsets(m_config, m_udi, m_fsize, m_offsets);
...
...
589
    if (!mh.next_document()) {
589
    if (!mh.next_document()) {
590
        cerr << "next_document failed after skipping to " << msgnum << endl;
590
        cerr << "next_document failed after skipping to " << msgnum << endl;
591
        exit(1);
591
        exit(1);
592
    }
592
    }
593
    map<string, string>::const_iterator it = 
593
    map<string, string>::const_iterator it = 
594
        mh.get_meta_data().find(cstr_content);
594
        mh.get_meta_data().find(cstr_dj_keycontent);
595
    int size;
595
    int size;
596
    if (it == mh.get_meta_data().end()) {
596
    if (it == mh.get_meta_data().end()) {
597
        size = -1;
597
        size = -1;
598
        cerr << "No content!!" << endl;
598
        cerr << "No content!!" << endl;
599
        exit(1);
599
        exit(1);
...
...
609
        cerr << "next_document failed" << endl;
609
        cerr << "next_document failed" << endl;
610
        exit(1);
610
        exit(1);
611
    }
611
    }
612
    docnt++;
612
    docnt++;
613
    map<string, string>::const_iterator it = 
613
    map<string, string>::const_iterator it = 
614
        mh.get_meta_data().find(cstr_content);
614
        mh.get_meta_data().find(cstr_dj_keycontent);
615
    int size;
615
    int size;
616
    if (it == mh.get_meta_data().end()) {
616
    if (it == mh.get_meta_data().end()) {
617
        size = -1;
617
        size = -1;
618
    } else {
618
    } else {
619
        size = it->second.length();
619
        size = it->second.length();