summaryrefslogtreecommitdiff
authoralwin <alwin>2003-12-12 14:49:50 (UTC)
committer alwin <alwin>2003-12-12 14:49:50 (UTC)
commit1aa69d74df6ac0ae182815e03fe57cfee5702d5a (patch) (unidiff)
tree4ba9bbeebb91e25c0f2ee25c2cd57fee41212e4d
parent8af6feb08d168fefaa2568b057efa132386471f6 (diff)
downloadopie-1aa69d74df6ac0ae182815e03fe57cfee5702d5a.zip
opie-1aa69d74df6ac0ae182815e03fe57cfee5702d5a.tar.gz
opie-1aa69d74df6ac0ae182815e03fe57cfee5702d5a.tar.bz2
and of course I'll find a bug 10 minutes after checkin ....
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/imapwrapper.cpp14
-rw-r--r--noncore/net/mail/libmailwrapper/imapwrapper.cpp14
2 files changed, 16 insertions, 12 deletions
diff --git a/noncore/net/mail/imapwrapper.cpp b/noncore/net/mail/imapwrapper.cpp
index da5974c..7b75ffa 100644
--- a/noncore/net/mail/imapwrapper.cpp
+++ b/noncore/net/mail/imapwrapper.cpp
@@ -640,30 +640,32 @@ void IMAPwrapper::fillSingleBasicPart(RecPart&target_part,mailimap_body_type_bas
640 } else { 640 } else {
641 sub = ""; 641 sub = "";
642 } 642 }
643 qDebug("Type = %s/%s",type.latin1(),sub.latin1()); 643 qDebug("Type = %s/%s",type.latin1(),sub.latin1());
644 target_part.setType(type.lower()); 644 target_part.setType(type.lower());
645 target_part.setSubtype(sub.lower()); 645 target_part.setSubtype(sub.lower());
646 fillBodyFields(target_part,which->bd_fields); 646 fillBodyFields(target_part,which->bd_fields);
647} 647}
648 648
649void IMAPwrapper::fillBodyFields(RecPart&target_part,mailimap_body_fields*which) 649void IMAPwrapper::fillBodyFields(RecPart&target_part,mailimap_body_fields*which)
650{ 650{
651 if (!which) return; 651 if (!which) return;
652 clistcell*cur; 652 if (which->bd_parameter && which->bd_parameter->pa_list && which->bd_parameter->pa_list->count>0) {
653 mailimap_single_body_fld_param*param; 653 clistcell*cur;
654 for (cur = clist_begin(which->bd_parameter->pa_list);cur!=NULL;cur=clist_next(cur)) { 654 mailimap_single_body_fld_param*param=0;
655 param = (mailimap_single_body_fld_param*)cur->data; 655 for (cur = clist_begin(which->bd_parameter->pa_list);cur!=NULL;cur=clist_next(cur)) {
656 if (param) { 656 param = (mailimap_single_body_fld_param*)cur->data;
657 target_part.addParameter(QString(param->pa_name).lower(),QString(param->pa_value)); 657 if (param) {
658 target_part.addParameter(QString(param->pa_name).lower(),QString(param->pa_value));
659 }
658 } 660 }
659 } 661 }
660 mailimap_body_fld_enc*enc = which->bd_encoding; 662 mailimap_body_fld_enc*enc = which->bd_encoding;
661 QString encoding(""); 663 QString encoding("");
662 switch (enc->enc_type) { 664 switch (enc->enc_type) {
663 case MAILIMAP_BODY_FLD_ENC_7BIT: 665 case MAILIMAP_BODY_FLD_ENC_7BIT:
664 encoding = "7bit"; 666 encoding = "7bit";
665 break; 667 break;
666 case MAILIMAP_BODY_FLD_ENC_8BIT: 668 case MAILIMAP_BODY_FLD_ENC_8BIT:
667 encoding = "8bit"; 669 encoding = "8bit";
668 break; 670 break;
669 case MAILIMAP_BODY_FLD_ENC_BINARY: 671 case MAILIMAP_BODY_FLD_ENC_BINARY:
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp
index da5974c..7b75ffa 100644
--- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp
+++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp
@@ -640,30 +640,32 @@ void IMAPwrapper::fillSingleBasicPart(RecPart&target_part,mailimap_body_type_bas
640 } else { 640 } else {
641 sub = ""; 641 sub = "";
642 } 642 }
643 qDebug("Type = %s/%s",type.latin1(),sub.latin1()); 643 qDebug("Type = %s/%s",type.latin1(),sub.latin1());
644 target_part.setType(type.lower()); 644 target_part.setType(type.lower());
645 target_part.setSubtype(sub.lower()); 645 target_part.setSubtype(sub.lower());
646 fillBodyFields(target_part,which->bd_fields); 646 fillBodyFields(target_part,which->bd_fields);
647} 647}
648 648
649void IMAPwrapper::fillBodyFields(RecPart&target_part,mailimap_body_fields*which) 649void IMAPwrapper::fillBodyFields(RecPart&target_part,mailimap_body_fields*which)
650{ 650{
651 if (!which) return; 651 if (!which) return;
652 clistcell*cur; 652 if (which->bd_parameter && which->bd_parameter->pa_list && which->bd_parameter->pa_list->count>0) {
653 mailimap_single_body_fld_param*param; 653 clistcell*cur;
654 for (cur = clist_begin(which->bd_parameter->pa_list);cur!=NULL;cur=clist_next(cur)) { 654 mailimap_single_body_fld_param*param=0;
655 param = (mailimap_single_body_fld_param*)cur->data; 655 for (cur = clist_begin(which->bd_parameter->pa_list);cur!=NULL;cur=clist_next(cur)) {
656 if (param) { 656 param = (mailimap_single_body_fld_param*)cur->data;
657 target_part.addParameter(QString(param->pa_name).lower(),QString(param->pa_value)); 657 if (param) {
658 target_part.addParameter(QString(param->pa_name).lower(),QString(param->pa_value));
659 }
658 } 660 }
659 } 661 }
660 mailimap_body_fld_enc*enc = which->bd_encoding; 662 mailimap_body_fld_enc*enc = which->bd_encoding;
661 QString encoding(""); 663 QString encoding("");
662 switch (enc->enc_type) { 664 switch (enc->enc_type) {
663 case MAILIMAP_BODY_FLD_ENC_7BIT: 665 case MAILIMAP_BODY_FLD_ENC_7BIT:
664 encoding = "7bit"; 666 encoding = "7bit";
665 break; 667 break;
666 case MAILIMAP_BODY_FLD_ENC_8BIT: 668 case MAILIMAP_BODY_FLD_ENC_8BIT:
667 encoding = "8bit"; 669 encoding = "8bit";
668 break; 670 break;
669 case MAILIMAP_BODY_FLD_ENC_BINARY: 671 case MAILIMAP_BODY_FLD_ENC_BINARY: