From 8e03a47995e6ee19dd49ce52bdf8b3fbadfa783d Mon Sep 17 00:00:00 2001 From: Yang Gu Date: Mon, 6 Sep 2010 10:19:55 +0800 Subject: [PATCH] call-barring: Check if ussd is busy --- src/call-barring.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/call-barring.c b/src/call-barring.c index 7607f3f..a8bb3bd 100644 --- a/src/call-barring.c +++ b/src/call-barring.c @@ -669,7 +669,7 @@ static DBusMessage *cb_get_properties(DBusConnection *conn, DBusMessage *msg, { struct ofono_call_barring *cb = data; - if (cb->pending) + if (cb->pending || __ofono_ussd_is_busy(cb->ussd)) return __ofono_error_busy(msg); if (!cb->driver->query) @@ -822,7 +822,7 @@ static DBusMessage *cb_set_property(DBusConnection *conn, DBusMessage *msg, int cls; int mode; - if (cb->pending) + if (cb->pending || __ofono_ussd_is_busy(cb->ussd)) return __ofono_error_busy(msg); if (!dbus_message_iter_init(msg, &iter)) @@ -894,7 +894,7 @@ static DBusMessage *cb_disable_all(DBusConnection *conn, DBusMessage *msg, if (!cb->driver->set) return __ofono_error_not_implemented(msg); - if (cb->pending) + if (cb->pending || __ofono_ussd_is_busy(cb->ussd)) return __ofono_error_busy(msg); if (dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &passwd, @@ -941,7 +941,7 @@ static DBusMessage *cb_set_passwd(DBusConnection *conn, DBusMessage *msg, if (!cb->driver->set_passwd) return __ofono_error_not_implemented(msg); - if (cb->pending) + if (cb->pending || __ofono_ussd_is_busy(cb->ussd)) return __ofono_error_busy(msg); if (dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &old_passwd, -- 2.7.4