stk: Fix error messsage from select item method call
authorMarcel Holtmann <marcel@holtmann.org>
Fri, 20 Aug 2010 12:48:48 +0000 (14:48 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 20 Aug 2010 12:48:48 +0000 (14:48 +0200)
src/stk.c

index ce71075..dd9f453 100644 (file)
--- a/src/stk.c
+++ b/src/stk.c
@@ -608,11 +608,11 @@ static DBusMessage *stk_select_item(DBusConnection *conn,
 
        DBG("");
 
-       if (stk->pending)
+       if (stk->pending || stk->session_agent)
                return __ofono_error_busy(msg);
 
-       if (stk->session_agent || !menu)
-               return __ofono_error_busy(msg);
+       if (!menu)
+               return __ofono_error_not_supported(msg);
 
        if (dbus_message_get_args(msg, NULL,
                                        DBUS_TYPE_BYTE, &selection,