r2939 - in trunk/src/target/OM-2007.2/applications/openmoko-dialer2: . src
thomas at sita.openmoko.org
thomas at sita.openmoko.org
Fri Sep 7 13:18:33 CEST 2007
Author: thomas
Date: 2007-09-07 13:18:32 +0200 (Fri, 07 Sep 2007)
New Revision: 2939
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c
Log:
* src/moko-dialer.c: (moko_dialer_init):#
- Prevent critical warnings if the journal cannot be loaded.
- Exit if we cannot connect to gsmd
Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog 2007-09-07 04:26:34 UTC (rev 2938)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog 2007-09-07 11:18:32 UTC (rev 2939)
@@ -1,3 +1,9 @@
+2007-09-07 Thomas Wood <thomas at openedhand.com>
+
+ * src/moko-dialer.c: (moko_dialer_init):#
+ - Prevent critical warnings if the journal cannot be loaded.
+ - Exit if we cannot connect to gsmd
+
2007-09-06 Thomas Wood <thomas at openedhand.com>
* src/moko-dialer-textview.c: (moko_dialer_textview_init): Prevent the display
Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c 2007-09-07 04:26:34 UTC (rev 2938)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c 2007-09-07 11:18:32 UTC (rev 2939)
@@ -21,6 +21,7 @@
#include <stdio.h>
#include <string.h>
+#include <stdlib.h>
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-bindings.h>
@@ -808,6 +809,8 @@
moko_gsmd_connection_set_antenna_power (conn, TRUE, &err);
dialer_display_error (err);
+ if (err && err->code == MOKO_GSMD_ERROR_CONNECT)
+ exit (1); /* no point continuing if we can't connect to gsmd? */
/* Handle network registration a few seconds after powering up the
* antenna*/
@@ -830,7 +833,7 @@
/* Set up the journal */
priv->journal = moko_journal_open_default ();
- if (!moko_journal_load_from_storage (priv->journal))
+ if (!priv->journal || moko_journal_load_from_storage (priv->journal))
{
g_warning ("Cannot load journal");
priv->journal = NULL;
More information about the commitlog
mailing list