From: Marcel Holtmann Date: Tue, 30 Jun 2009 20:23:05 +0000 (-0700) Subject: Add the current error state to properties X-Git-Tag: 0.20~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=18f11f4e1dbfce53675c40dcde907f11d32cce43;p=platform%2Fupstream%2Fconnman.git Add the current error state to properties --- diff --git a/doc/service-api.txt b/doc/service-api.txt index cf45999..ae788a3 100644 --- a/doc/service-api.txt +++ b/doc/service-api.txt @@ -97,7 +97,7 @@ Properties string State [readonly] the "failure" state. Otherwise it might be empty or not present at all. - The detailed error codes will be defined later. + Current defined error code is "dhcp-failed". string Name [readonly] diff --git a/src/service.c b/src/service.c index f2886cf..e166460 100644 --- a/src/service.c +++ b/src/service.c @@ -300,6 +300,11 @@ static DBusMessage *get_properties(DBusConnection *conn, connman_dbus_dict_append_variant(&dict, "State", DBUS_TYPE_STRING, &str); + str = error2string(service->error); + if (str != NULL) + connman_dbus_dict_append_variant(&dict, "Error", + DBUS_TYPE_STRING, &str); + if (service->strength > 0) connman_dbus_dict_append_variant(&dict, "Strength", DBUS_TYPE_BYTE, &service->strength);