[network-manager-applet/NMA_0_8] mobile: strip important strings from the provider database
- From: Dan Williams <dcbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/NMA_0_8] mobile: strip important strings from the provider database
- Date: Wed, 22 Sep 2010 17:50:43 +0000 (UTC)
commit 3fe44bf81ee075a5c58c0120b7ee3bd03a9c55e3
Author: Dan Williams <dcbw redhat com>
Date: Wed Sep 22 09:37:13 2010 -0500
mobile: strip important strings from the provider database
Just to ensure we don't get leading or trailing spaces which aren't
legal for APNs or other attributes.
src/utils/nmn-mobile-providers.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/utils/nmn-mobile-providers.c b/src/utils/nmn-mobile-providers.c
index 4cb8286..64df345 100644
--- a/src/utils/nmn-mobile-providers.c
+++ b/src/utils/nmn-mobile-providers.c
@@ -131,8 +131,8 @@ mcc_mnc_new (const char *mcc, const char *mnc)
NmnGsmMccMnc *m;
m = g_slice_new0 (NmnGsmMccMnc);
- m->mcc = g_strdup (mcc);
- m->mnc = g_strdup (mnc);
+ m->mcc = g_strstrip (g_strdup (mcc));
+ m->mnc = g_strstrip (g_strdup (mnc));
return m;
}
@@ -365,7 +365,7 @@ parser_gsm_start (MobileParser *parser,
parser->state = PARSER_METHOD_GSM_APN;
parser->current_method = access_method_new ();
- parser->current_method->gsm_apn = g_strdup (attribute_values[i]);
+ parser->current_method->gsm_apn = g_strstrip (g_strdup (attribute_values[i]));
break;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]