Skip to content

Commit

Permalink
[mms-dump] Fixed decoding of PDUs containing no attachments
Browse files Browse the repository at this point in the history
  • Loading branch information
monich committed Apr 22, 2014
1 parent 654ddb5 commit d0e7a39
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions mms-dump/mms-dump.c
Expand Up @@ -955,17 +955,16 @@ mms_decode_data(
printf("MMS headers:\n");
wsp_header_iter_init(&iter, data, len, WSP_HEADER_ITER_FLAG_REJECT_CP |
WSP_HEADER_ITER_FLAG_DETECT_MMS_MULTIPART);
if (mms_message_decode_headers(&iter, " ", flags) &&
(wsp_header_iter_at_end(&iter) ||
wsp_header_iter_is_content_type(&iter))) {

if (mms_message_decode_headers(&iter, " ", flags)) {
if (wsp_header_iter_at_end(&iter)) {
return RET_OK;
} else if (wsp_header_iter_is_content_type(&iter)) {
if (wsp_header_iter_is_multipart(&iter)) {
if (mms_decode_multipart(&iter, flags) &&
wsp_header_iter_at_end(&iter)) {
return RET_OK;
}
} else {
if (mms_decode_attachment(&iter, flags)) {
} else if (mms_decode_attachment(&iter, flags)) {
return RET_OK;
}
}
Expand Down

0 comments on commit d0e7a39

Please sign in to comment.