From 7409a6761f6dcebf8a0d8b60222c8a7b7f9a1d64 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Thu, 22 Oct 2009 17:42:40 -0500 Subject: Refactor: Context get_properties --- src/gprs.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/gprs.c b/src/gprs.c index d2f8234e..ba4e7d37 100644 --- a/src/gprs.c +++ b/src/gprs.c @@ -136,20 +136,24 @@ static DBusMessage *pri_get_properties(DBusConnection *conn, OFONO_PROPERTIES_ARRAY_SIGNATURE, &dict); - value = ctx->context->active; + ofono_dbus_dict_append(&dict, "Name", DBUS_TYPE_STRING, &name); + + value = ctx->active; ofono_dbus_dict_append(&dict, "Active", DBUS_TYPE_BOOLEAN, &value); - ofono_dbus_dict_append(&dict, "AccessPointName", - DBUS_TYPE_STRING, &ctx->context->apn); + ofono_dbus_dict_append(&dict, "Type", DBUS_TYPE_STRING, &type); - ofono_dbus_dict_append(&dict, "Type", - DBUS_TYPE_STRING, &type); + strvalue = ctx->context.apn; + ofono_dbus_dict_append(&dict, "AccessPointName", DBUS_TYPE_STRING, + &strvalue); - ofono_dbus_dict_append(&dict, "Username", - DBUS_TYPE_STRING, &ctx->context->username); + strvalue = ctx->context.username; + ofono_dbus_dict_append(&dict, "Username", DBUS_TYPE_STRING, + &strvalue); - ofono_dbus_dict_append(&dict, "Passwod", - DBUS_TYPE_STRING, &ctx->context->password); + strvalue = ctx->context.password; + ofono_dbus_dict_append(&dict, "Passwod", DBUS_TYPE_STRING, + &strvalue); dbus_message_iter_close_container(&iter, &dict); -- cgit v1.2.3