Re: [MM] [PATCH] broadband-bearer: handle NULL and character escaping of APN value
- From: Aleksander Morgado <aleksander lanedo com>
- To: Dan Williams <dcbw redhat com>
- Cc: networkmanager-list gnome org
- Subject: Re: [MM] [PATCH] broadband-bearer: handle NULL and character escaping of APN value
- Date: Fri, 05 Apr 2013 08:23:56 +0200
On 04/04/2013 10:05 PM, Dan Williams wrote:
On Thu, 2013-04-04 at 12:40 -0700, Ben Chan wrote:
---
src/mm-broadband-bearer.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
I'll assume then that somebody has a \ or " in their APN then, right?
In any case, patch looks good.
Pushed to git master, thanks!
diff --git a/src/mm-broadband-bearer.c b/src/mm-broadband-bearer.c
index c34867d..fe894c9 100644
--- a/src/mm-broadband-bearer.c
+++ b/src/mm-broadband-bearer.c
@@ -753,7 +753,7 @@ find_cid_ready (MMBaseModem *modem,
DetailedConnectContext *ctx)
{
GVariant *result;
- gchar *command;
+ gchar *apn, *command;
GError *error = NULL;
const gchar *pdp_type;
@@ -783,10 +783,12 @@ find_cid_ready (MMBaseModem *modem,
}
ctx->cid = g_variant_get_uint32 (result);
- command = g_strdup_printf ("+CGDCONT=%u,\"%s\",\"%s\"",
+ apn = mm_at_serial_port_quote_string (mm_bearer_properties_get_apn (mm_bearer_peek_config (MM_BEARER
(ctx->self))));
+ command = g_strdup_printf ("+CGDCONT=%u,\"%s\",%s",
ctx->cid,
pdp_type,
- mm_bearer_properties_get_apn (mm_bearer_peek_config (MM_BEARER
(ctx->self))));
+ apn);
+ g_free (apn);
mm_base_modem_at_command_full (ctx->modem,
ctx->primary,
command,
_______________________________________________
networkmanager-list mailing list
networkmanager-list gnome org
https://mail.gnome.org/mailman/listinfo/networkmanager-list
--
Aleksander
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]