diff mbox series

[2/9] Ensure Compatibility with Telus Canada

Message ID 082ccadaf9654e1580540e73cc8defc522d97b2d.camel@talbothome.com (mailing list archive)
State Not Applicable
Headers show
Series A set of patches for ofono/mmsd | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Chris Talbot March 26, 2021, 10:50 a.m. UTC
mmsd decodes a header that is not in the standard.
This patch allows this header to be decoded
---
 src/mmsutil.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

 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);
diff mbox series

Patch

diff --git a/src/mmsutil.c b/src/mmsutil.c
index 5fcf358..9430bf1 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;
 }