2009/8/4 Denis Kenzior <[email protected]>:
> I've pushed this patch and heavily customized it afterwards to simplify the
> logic a bit.  Can you check that it is still working as intended?

It is kind of working but one of the things "simplified away" is using
the D-Bus interface even without working EF-MBDN or EF-MWIS files on
the SIM, i.e. if the write fails then the user never finds out there
was a notification.

Consistently with the change to return invalid_args on D-Bus type
mismatch, I'm attaching a diff to do the same thing for other
interfaces we have.

You might want to add G_DBUS_METHOD_FLAG_ASYNC to SetProperty
signature and remove mw_update declaration which is now unused.  Also
the check in cache_info should probably be if (r < len).

>
> Writing of MBDN fields is still missing.  Can you send another patch for this?

Sent separately.

> Also one fo writing of MSISDN records in SimManager would be good as well.

Will get on it today.

Regards
From 4096f07b8b08005866ee69188763e5885574ed8c Mon Sep 17 00:00:00 2001
From: Andrzej Zaborowski <[email protected]>
Date: Wed, 5 Aug 2009 07:17:10 +0200
Subject: [PATCH] Use invalid_args instead of invalid_format

---
 src/call-barring.c  |    4 ++--
 src/call-meter.c    |    4 ++--
 src/call-settings.c |    4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/call-barring.c b/src/call-barring.c
index 36deaf7..386a127 100644
--- a/src/call-barring.c
+++ b/src/call-barring.c
@@ -882,13 +882,13 @@ static DBusMessage *cb_set_property(DBusConnection *conn, DBusMessage *msg,
 	dbus_message_iter_recurse(&iter, &var);
 
 	if (dbus_message_iter_get_arg_type(&var) != DBUS_TYPE_STRING)
-		return __ofono_error_invalid_format(msg);
+		return __ofono_error_invalid_args(msg);
 
 	dbus_message_iter_get_basic(&var, &value);
 
 	if (!cb_lock_property_lookup(name, value, BEARER_CLASS_VOICE,
 					&lock, &cls, &mode))
-		return __ofono_error_invalid_format(msg);
+		return __ofono_error_invalid_args(msg);
 
 	if (dbus_message_iter_next(&iter)) {
 		if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING)
diff --git a/src/call-meter.c b/src/call-meter.c
index 421fe0c..6147540 100644
--- a/src/call-meter.c
+++ b/src/call-meter.c
@@ -584,7 +584,7 @@ static DBusMessage *cm_set_property(DBusConnection *conn, DBusMessage *msg,
 		return __ofono_error_invalid_args(msg);
 
 	if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING)
-			return __ofono_error_invalid_args(msg);
+		return __ofono_error_invalid_args(msg);
 
 	dbus_message_iter_get_basic(&iter, &passwd);
 
@@ -596,7 +596,7 @@ static DBusMessage *cm_set_property(DBusConnection *conn, DBusMessage *msg,
 			continue;
 
 		if (dbus_message_iter_get_arg_type(&var) != property->type)
-			return __ofono_error_invalid_format(msg);
+			return __ofono_error_invalid_args(msg);
 
 		return property->set(msg, modem, &var, passwd);
 	}
diff --git a/src/call-settings.c b/src/call-settings.c
index 18e8189..9fcb59e 100644
--- a/src/call-settings.c
+++ b/src/call-settings.c
@@ -1167,7 +1167,7 @@ static DBusMessage *cs_set_property(DBusConnection *conn, DBusMessage *msg,
 		const char *setting;
 
 		if (dbus_message_iter_get_arg_type(&var) != DBUS_TYPE_STRING)
-			return __ofono_error_invalid_format(msg);
+			return __ofono_error_invalid_args(msg);
 
 		dbus_message_iter_get_basic(&var, &setting);
 
@@ -1176,7 +1176,7 @@ static DBusMessage *cs_set_property(DBusConnection *conn, DBusMessage *msg,
 		const char *setting;
 
 		if (dbus_message_iter_get_arg_type(&var) != DBUS_TYPE_STRING)
-			return __ofono_error_invalid_format(msg);
+			return __ofono_error_invalid_args(msg);
 
 		dbus_message_iter_get_basic(&var, &setting);
 
-- 
1.6.1

_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to