ofono.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: ofono@market.talbothome.com
To: ofono@ofono.org
Subject: [PATCH 04/09] MMSD: Ensure Compatibilty with AT&T
Date: Fri, 19 Feb 2021 01:01:12 +0000	[thread overview]
Message-ID: <20210219010112.2937.43652@ml01.vlan13.01.org> (raw)

[-- 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

                 reply	other threads:[~2021-02-19  1:01 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=20210219010112.2937.43652@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 NNTP newsgroup(s).