From: ofono@market.talbothome.com
To: ofono@ofono.org
Subject: [PATCH 03/09] MMSD: Ensure Compatibility with Telus
Date: Fri, 19 Feb 2021 01:00:01 +0000 [thread overview]
Message-ID: <20210219010001.2937.62339@ml01.vlan13.01.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1251 bytes --]
Telus decodes in such a way to introduce unknown headers in the MMS decode.
This patch enables mmsd to handle these headers.
---
src/mmsutil.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/mmsutil.c b/src/mmsutil.c
index 5fcf358..ef72f20 100644
--- a/src/mmsutil.c
+++ b/src/mmsutil.c
@@ -732,10 +732,9 @@ static header_handler handler_for_type(enum mms_header header)
return extract_text;
case MMS_HEADER_INVALID:
case __MMS_HEADER_MAX:
+ default:
return NULL;
}
-
- return NULL;
}
struct header_handler_entry {
@@ -781,8 +780,17 @@ static gboolean mms_parse_headers(struct wsp_header_iter *iter,
handler = handler_for_type(h);
if (handler == NULL) {
- DBG("no handler for type %u", h);
- return FALSE;
+ if(h == MMS_HEADER_INVALID) {
+ DBG("no handler for type %u", h);
+ return FALSE;
+ } else if (h == __MMS_HEADER_MAX) {
+ DBG("no handler for type %u", h);
+ return FALSE;
+ } else {
+ /* Telus has strange headers, so this handles it */
+ DBG("type isn't a part of the standard? Skipping %u", h);
+ continue;
+ }
}
DBG("saw header of type %u", h);
--
2.30.0
reply other threads:[~2021-02-19 1:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210219010001.2937.62339@ml01.vlan13.01.org \
--to=ofono@market.talbothome.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).