summaryrefslogtreecommitdiff
authoralwin <alwin>2005-03-11 22:15:12 (UTC)
committer alwin <alwin>2005-03-11 22:15:12 (UTC)
commitcff58fc3b963a09506a17d17cf4e3f9a3887d491 (patch) (side-by-side diff)
tree450d113bd74f5a4934b9540dd6ec883a6e23e6cf
parente851ff8f826be005a2aa935133d40b162f23de53 (diff)
downloadopie-cff58fc3b963a09506a17d17cf4e3f9a3887d491.zip
opie-cff58fc3b963a09506a17d17cf4e3f9a3887d491.tar.gz
opie-cff58fc3b963a09506a17d17cf4e3f9a3887d491.tar.bz2
even a full correct mail comes via generic protocoll like pop3 or mh
parts of were stored with wrong identifier inside cache.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/genericwrapper.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/noncore/net/mail/libmailwrapper/genericwrapper.cpp b/noncore/net/mail/libmailwrapper/genericwrapper.cpp
index 0ac842d..6fcc701 100644
--- a/noncore/net/mail/libmailwrapper/genericwrapper.cpp
+++ b/noncore/net/mail/libmailwrapper/genericwrapper.cpp
@@ -150,3 +150,2 @@ void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*m
clistiter * cur = 0;
- QString b;
RecPartP part = new RecPart();
@@ -161,5 +160,7 @@ void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*m
part->setPositionlist(countlist);
- b = gen_attachment_id();
- part->setIdentifier(b);
fillSingleBody(part,message,mime);
+ if (part->Identifier().isEmpty()) {
+ part->setIdentifier(gen_attachment_id());
+ }
+
if (part->Type()=="text" && target->Bodytext().isNull()) {
@@ -169,3 +170,3 @@ void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*m
if (countlist.count()>2) {
- bodyCache[b]=rs;
+ bodyCache[part->Identifier()]=rs;
target->addPart(part);
@@ -174,2 +175,3 @@ void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*m
}
+ QString b;
b = QString(res->Content());
@@ -179,3 +181,3 @@ void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*m
} else {
- bodyCache[b]=new encodedString(data,len);
+ bodyCache[part->Identifier()]=new encodedString(data,len);
target->addPart(part);
@@ -216,7 +218,6 @@ void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*m
part->setPositionlist(countlist);
- b = gen_attachment_id();
- part->setIdentifier(b);
+ part->setIdentifier(gen_attachment_id());
part->setType("message");
part->setSubtype("rfc822");
- bodyCache[b]=new encodedString(data,len);
+ bodyCache[part->Identifier()]=new encodedString(data,len);
target->addPart(part);