-rw-r--r-- | noncore/net/mail/libmailwrapper/genericwrapper.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/noncore/net/mail/libmailwrapper/genericwrapper.cpp b/noncore/net/mail/libmailwrapper/genericwrapper.cpp index ffa049f..6c8a5a1 100644 --- a/noncore/net/mail/libmailwrapper/genericwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/genericwrapper.cpp | |||
@@ -137,56 +137,56 @@ void Genericwrapper::traverseBody(RecBody&target,mailmessage*message,mailmime*mi | |||
137 | qDebug("too deep recursion!"); | 137 | qDebug("too deep recursion!"); |
138 | } | 138 | } |
139 | if (!message || !mime) { | 139 | if (!message || !mime) { |
140 | return; | 140 | return; |
141 | } | 141 | } |
142 | int r; | 142 | int r; |
143 | char*data = 0; | 143 | char*data = 0; |
144 | size_t len; | 144 | size_t len; |
145 | clistiter * cur = 0; | 145 | clistiter * cur = 0; |
146 | QString b; | 146 | QString b; |
147 | RecPart part; | 147 | RecPart part; |
148 | 148 | ||
149 | switch (mime->mm_type) { | 149 | switch (mime->mm_type) { |
150 | case MAILMIME_SINGLE: | 150 | case MAILMIME_SINGLE: |
151 | { | 151 | { |
152 | QValueList<int>countlist = recList; | 152 | QValueList<int>countlist = recList; |
153 | countlist.append(current_count); | 153 | countlist.append(current_count); |
154 | r = mailmessage_fetch_section(message,mime,&data,&len); | 154 | r = mailmessage_fetch_section(message,mime,&data,&len); |
155 | part.setSize(len); | 155 | part.setSize(len); |
156 | part.setPositionlist(countlist); | 156 | part.setPositionlist(countlist); |
157 | b = gen_attachment_id(); | 157 | b = gen_attachment_id(); |
158 | part.setIdentifier(b); | 158 | part.setIdentifier(b); |
159 | fillSingleBody(part,message,mime); | 159 | fillSingleBody(part,message,mime); |
160 | if (part.Type()=="text" && target.Bodytext().isNull()) { | 160 | if (part.Type()=="text" && target.Bodytext().isNull()) { |
161 | encodedString*r = new encodedString(); | 161 | encodedString*rs = new encodedString(); |
162 | r->setContent(data,len); | 162 | rs->setContent(data,len); |
163 | encodedString*res = decode_String(r,part.Encoding()); | 163 | encodedString*res = decode_String(rs,part.Encoding()); |
164 | if (countlist.count()>2) { | 164 | if (countlist.count()>2) { |
165 | bodyCache[b]=r; | 165 | bodyCache[b]=rs; |
166 | target.addPart(part); | 166 | target.addPart(part); |
167 | } else { | 167 | } else { |
168 | delete r; | 168 | delete rs; |
169 | } | 169 | } |
170 | b = QString(res->Content()); | 170 | b = QString(res->Content()); |
171 | delete res; | 171 | delete res; |
172 | target.setBodytext(b); | 172 | target.setBodytext(b); |
173 | target.setDescription(part); | 173 | target.setDescription(part); |
174 | } else { | 174 | } else { |
175 | bodyCache[b]=new encodedString(data,len); | 175 | bodyCache[b]=new encodedString(data,len); |
176 | target.addPart(part); | 176 | target.addPart(part); |
177 | } | 177 | } |
178 | } | 178 | } |
179 | break; | 179 | break; |
180 | case MAILMIME_MULTIPLE: | 180 | case MAILMIME_MULTIPLE: |
181 | { | 181 | { |
182 | unsigned int ccount = 1; | 182 | unsigned int ccount = 1; |
183 | mailmime*cbody=0; | 183 | mailmime*cbody=0; |
184 | QValueList<int>countlist = recList; | 184 | QValueList<int>countlist = recList; |
185 | for (cur = clist_begin(mime->mm_data.mm_multipart.mm_mp_list) ; cur != NULL ; cur = clist_next(cur)) { | 185 | for (cur = clist_begin(mime->mm_data.mm_multipart.mm_mp_list) ; cur != NULL ; cur = clist_next(cur)) { |
186 | cbody = (mailmime*)clist_content(cur); | 186 | cbody = (mailmime*)clist_content(cur); |
187 | if (cbody->mm_type==MAILMIME_MULTIPLE) { | 187 | if (cbody->mm_type==MAILMIME_MULTIPLE) { |
188 | RecPart targetPart; | 188 | RecPart targetPart; |
189 | targetPart.setType("multipart"); | 189 | targetPart.setType("multipart"); |
190 | countlist.append(current_count); | 190 | countlist.append(current_count); |
191 | targetPart.setPositionlist(countlist); | 191 | targetPart.setPositionlist(countlist); |
192 | target.addPart(targetPart); | 192 | target.addPart(targetPart); |