All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/9] Ensure Compatibility with Telus Canada
@ 2021-03-26 10:50 Christopher Talbot
  0 siblings, 0 replies; 4+ messages in thread
From: Christopher Talbot @ 2021-03-26 10:50 UTC (permalink / raw)
  To: netdev


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(-)

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;
 }
 
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/9] Ensure Compatibility with Telus Canada
  2021-04-10 14:17 ` [PATCH 1/9] Fix mmsd to work with T-mobile Chris Talbot
@ 2021-04-10 14:20     ` Chris Talbot
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Talbot @ 2021-04-10 14:20 UTC (permalink / raw)
  To: ofono, netdev, debian-on-mobile-maintainers, librem-5-dev

Telus Canada makes mmsd decode a header that is not in the standard.
This patch allows this header to be decoded and allows for MMS support
in Telus Canada.
---
 src/mmsutil.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

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;
 }
 
 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.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/9] Ensure Compatibility with Telus Canada
@ 2021-04-10 14:20     ` Chris Talbot
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Talbot @ 2021-04-10 14:20 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1257 bytes --]

Telus Canada makes mmsd decode a header that is not in the standard.
This patch allows this header to be decoded and allows for MMS support
in Telus Canada.
---
 src/mmsutil.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

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;
 }
 
 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.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/9] Ensure Compatibility with Telus Canada
  2021-02-25  0:39 Patches For MMSD chris
@ 2021-02-25  0:43 ` Christopher Talbot
  0 siblings, 0 replies; 4+ messages in thread
From: Christopher Talbot @ 2021-02-25  0:43 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1196 bytes --]


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(-)

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;
 }
 
 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-10 14:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-26 10:50 [PATCH 2/9] Ensure Compatibility with Telus Canada Christopher Talbot
  -- strict thread matches above, loose matches on Subject: below --
2021-04-10 14:13 [PATCH 0/9] Updates for mmsd Chris Talbot
2021-04-10 14:17 ` [PATCH 1/9] Fix mmsd to work with T-mobile Chris Talbot
2021-04-10 14:20   ` [PATCH 2/9] Ensure Compatibility with Telus Canada Chris Talbot
2021-04-10 14:20     ` Chris Talbot
2021-02-25  0:39 Patches For MMSD chris
2021-02-25  0:43 ` [PATCH 2/9] Ensure Compatibility with Telus Canada Christopher Talbot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.