summaryrefslogtreecommitdiff
path: root/plugins/ofono.c
diff options
context:
space:
mode:
authorPekka Pessi <Pekka.Pessi@nokia.com>2010-09-09 12:13:52 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2010-09-09 20:44:39 +0200
commit88c6c8d6d58d3622ab0a92ad36908bb0a1c0ed54 (patch)
tree0a22518d7589a4a9eecdcdaf2cbd0557476d3bba /plugins/ofono.c
parentdf3a05e62af589130f580c8889c8e20ec505572e (diff)
downloadconnman-88c6c8d6d58d3622ab0a92ad36908bb0a1c0ed54.tar.gz
connman-88c6c8d6d58d3622ab0a92ad36908bb0a1c0ed54.tar.bz2
connman-88c6c8d6d58d3622ab0a92ad36908bb0a1c0ed54.zip
ofono: log more of the errors
Diffstat (limited to 'plugins/ofono.c')
-rw-r--r--plugins/ofono.c32
1 files changed, 27 insertions, 5 deletions
diff --git a/plugins/ofono.c b/plugins/ofono.c
index 69121e2c..5ac77f5b 100644
--- a/plugins/ofono.c
+++ b/plugins/ofono.c
@@ -92,8 +92,8 @@ static void set_property_reply(DBusPendingCall *call, void *user_data)
reply = dbus_pending_call_steal_reply(call);
if (dbus_set_error_from_message(&error, reply)) {
- connman_error("SetProperty(\"%s\") %s", name,
- error.message);
+ connman_error("SetProperty(%s) %s %s", name,
+ error.name, error.message);
dbus_error_free(&error);
}
@@ -310,7 +310,7 @@ static void set_network_name(struct connman_network *network)
if (dbus_connection_send_with_reply(connection, message,
&call, TIMEOUT) == FALSE) {
- connman_error("Failed to get operator");
+ connman_error("Failed to get operator name");
goto done;
}
@@ -546,7 +546,8 @@ static void set_active_reply(DBusPendingCall *call, void *user_data)
pending_network = NULL;
- connman_error("%s", error.message);
+ connman_error("SetProperty(Active) %s %s",
+ error.name, error.message);
dbus_error_free(&error);
} else
@@ -710,7 +711,8 @@ static void create_context_reply(DBusPendingCall *call, void *user_data)
reply = dbus_pending_call_steal_reply(call);
if (dbus_set_error_from_message(&error, reply)) {
- connman_error("%s", error.message);
+ connman_error("CreateContext() %s %s",
+ error.name, error.message);
dbus_error_free(&error);
}
@@ -1071,6 +1073,7 @@ static gboolean modem_has_gprs(DBusMessageIter *array)
static void modem_properties_reply(DBusPendingCall *call, void *user_data)
{
DBusMessage *reply;
+ DBusError error;
DBusMessageIter array, dict;
const char *path = user_data;
@@ -1078,6 +1081,15 @@ static void modem_properties_reply(DBusPendingCall *call, void *user_data)
reply = dbus_pending_call_steal_reply(call);
+ dbus_error_init(&error);
+
+ if (dbus_set_error_from_message(&error, reply)) {
+ connman_error("Modem.GetProperties(%s) %s %s",
+ path, error.name, error.message);
+ dbus_error_free(&error);
+ goto done;
+ }
+
if (dbus_message_iter_init(reply, &array) == FALSE)
goto done;
@@ -1206,12 +1218,22 @@ static void update_modems(DBusMessageIter *array)
static void manager_properties_reply(DBusPendingCall *call, void *user_data)
{
DBusMessage *reply;
+ DBusError error;
DBusMessageIter array, dict;
DBG("");
reply = dbus_pending_call_steal_reply(call);
+ dbus_error_init(&error);
+
+ if (dbus_set_error_from_message(&error, reply)) {
+ connman_error("ModemManager.GetProperties() %s %s",
+ error.name, error.message);
+ dbus_error_free(&error);
+ goto done;
+ }
+
if (dbus_message_iter_init(reply, &array) == FALSE)
goto done;