r3864 - in trunk/src/target/OM-2007.2/applications/openmoko-dialer2: . src/phone-kit
chris at sita.openmoko.org
chris at sita.openmoko.org
Thu Jan 17 12:52:41 CET 2008
Author: chris
Date: 2008-01-17 12:52:40 +0100 (Thu, 17 Jan 2008)
New Revision: 3864
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/phone-kit/moko-network.c
Log:
* src/phone-kit/moko-network.c: (on_network_registered),
(moko_network_get_country_code):
Do get the operators list, but only when roaming - when not roaming,
return the home country code when asked for the local country code
Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog 2008-01-17 11:36:56 UTC (rev 3863)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog 2008-01-17 11:52:40 UTC (rev 3864)
@@ -1,5 +1,12 @@
2008-01-17 Chris Lord <chris at openedhand.com>
+ * src/phone-kit/moko-network.c: (on_network_registered),
+ (moko_network_get_country_code):
+ Do get the operators list, but only when roaming - when not roaming,
+ return the home country code when asked for the local country code
+
+2008-01-17 Chris Lord <chris at openedhand.com>
+
* src/moko-dialer-glue.h:
Remove, shouldn't be in version control
Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/phone-kit/moko-network.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/phone-kit/moko-network.c 2008-01-17 11:36:56 UTC (rev 3863)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/phone-kit/moko-network.c 2008-01-17 11:52:40 UTC (rev 3864)
@@ -196,12 +196,6 @@
/* Retrieve operator name */
lgsm_oper_get (handle);
- /* Retrieve operator list to get current country code */
- /* FIXME: This takes too long, we need gsmd to give us the current
- * operator number from lgsm_oper_get.
- */
- /*lgsm_opers_get (handle);*/
-
/* Retrieve IMSI to get home country code */
lgsm_get_imsi (handle);
@@ -212,14 +206,21 @@
priv->retry_oper = g_timeout_add_seconds (RETRY_DELAY,
(GSourceFunc)retry_oper_get,
listener);
- /*if (priv->retry_opers_n)
- priv->retry_opers = g_timeout_add_seconds (RETRY_DELAY,
- (GSourceFunc)retry_opers_get,
- listener);*/
if (priv->retry_imsi_n)
priv->retry_imsi = g_timeout_add_seconds (RETRY_DELAY,
(GSourceFunc)retry_get_imsi,
listener);
+
+ if (type == GSMD_NETREG_REG_ROAMING) {
+ /* Retrieve operator list to get current country code */
+ /* FIXME: This blocks other gsmd calls... Error states? */
+ lgsm_opers_get (handle);
+
+ if (priv->retry_opers_n)
+ priv->retry_opers = g_timeout_add_seconds (RETRY_DELAY,
+ (GSourceFunc)retry_opers_get,
+ listener);
+ }
}
break;
@@ -933,6 +934,10 @@
if (!moko_network_check_registration (self, error)) return FALSE;
priv = self->priv;
+ if (priv->registered == GSMD_NETREG_REG_HOME) {
+ return moko_network_get_home_country_code (self, dial_code, error);
+ }
+
if (!priv->network_number) {
if (error) *error = g_error_new (PHONE_KIT_NETWORK_ERROR,
PK_NETWORK_ERROR_NO_PROVIDER_NUM,
More information about the commitlog
mailing list