From e327f964cec1972bbbfc8517c64243f0b7a5c1b3 Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Mon, 12 Sep 2011 09:06:32 -0300 Subject: [PATCH] Return EALREADY if the adapter is already up/down --- src/adapter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/adapter.c b/src/adapter.c index 7a5f7b328..7d0c63ede 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -3405,7 +3405,7 @@ int btd_adapter_switch_online(struct btd_adapter *adapter) return -EINVAL; if (adapter->up) - return 0; + return -EALREADY; if (adapter->off_timer) off_timer_remove(adapter); @@ -3419,7 +3419,7 @@ int btd_adapter_switch_offline(struct btd_adapter *adapter) return -EINVAL; if (!adapter->up) - return 0; + return -EALREADY; if (adapter->off_timer) return 0; -- 2.47.3