ofono.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH 04/09] MMSD: Ensure Compatibilty with AT&T
@ 2021-02-19  1:01 ofono
  0 siblings, 0 replies; only message in thread
From: ofono @ 2021-02-19  1:01 UTC (permalink / raw)
  To: ofono

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

AT&T requires explicit closing of the web connection, and has a DNS domain
for their proxy. This patch enables both those to have mmsd work with AT&T

---
 gweb/gweb.c   | 3 ++-
 src/service.c | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gweb/gweb.c b/gweb/gweb.c
index f72e137..995d12f 100644
--- a/gweb/gweb.c
+++ b/gweb/gweb.c
@@ -1309,7 +1309,8 @@ static guint do_request(GWeb *web, const char *url,
 			session->address = g_strdup(session->host);
 
 		memset(&hints, 0, sizeof(struct addrinfo));
-		hints.ai_flags = AI_NUMERICHOST;
+		/* Comment out next line to have AT&T MMS proxy work */
+		//hints.ai_flags = AI_NUMERICHOST;
 		hints.ai_family = session->web->family;
 
 		if (session->addr != NULL) {
diff --git a/src/service.c b/src/service.c
index 082e3bb..a9b07f6 100644
--- a/src/service.c
+++ b/src/service.c
@@ -2528,6 +2528,9 @@ void mms_service_bearer_notify(struct mms_service *service, mms_bool_t active,
 
 	g_web_set_debug(service->web, (GWebDebugFunc)debug_print, NULL);
 
+	/* Explicitly close connections to work with AT&T */
+	g_web_set_close_connection(service->web,TRUE);
+
 	/* Sometimes no proxy is reported as string instead of NULL */
 	if (g_strcmp0(proxy, "") != 0)
 		g_web_set_proxy(service->web, proxy);
-- 
2.30.0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-02-19  1:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-19  1:01 [PATCH 04/09] MMSD: Ensure Compatibilty with AT&T ofono

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 NNTP newsgroup(s).