summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlok Barsode <alok.barsode@nokia.com>2011-02-09 13:39:56 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2011-02-15 13:06:49 +0100
commit460ad9cff5ff0850e1c860ca3f7627c6eb7e0575 (patch)
treec661edf096f6ad526a1222bfde02ebac06894ba9
parent2b9c55695aefdf68481c4d78324f350092a8d543 (diff)
downloadconnman-460ad9cff5ff0850e1c860ca3f7627c6eb7e0575.tar.gz
connman-460ad9cff5ff0850e1c860ca3f7627c6eb7e0575.tar.bz2
connman-460ad9cff5ff0850e1c860ca3f7627c6eb7e0575.zip
technology: Remove "blocked" state and use "offline" state instead
Both "offline" and "blocked" states mean the same hence merging them.
-rw-r--r--doc/technology-api.txt4
-rw-r--r--src/technology.c13
2 files changed, 7 insertions, 10 deletions
diff --git a/doc/technology-api.txt b/doc/technology-api.txt
index 992ee569..c86a58ed 100644
--- a/doc/technology-api.txt
+++ b/doc/technology-api.txt
@@ -21,8 +21,8 @@ Properties string State [readonly]
The technology state information.
- Valid states are "offline", "available", "blocked",
- "enabled "and "connected".
+ Valid states are "offline", "available", "enabled"
+ and "connected".
string Name [readonly]
diff --git a/src/technology.c b/src/technology.c
index 2a486988..aa6fde01 100644
--- a/src/technology.c
+++ b/src/technology.c
@@ -46,9 +46,8 @@ enum connman_technology_state {
CONNMAN_TECHNOLOGY_STATE_UNKNOWN = 0,
CONNMAN_TECHNOLOGY_STATE_OFFLINE = 1,
CONNMAN_TECHNOLOGY_STATE_AVAILABLE = 2,
- CONNMAN_TECHNOLOGY_STATE_BLOCKED = 3,
- CONNMAN_TECHNOLOGY_STATE_ENABLED = 4,
- CONNMAN_TECHNOLOGY_STATE_CONNECTED = 5,
+ CONNMAN_TECHNOLOGY_STATE_ENABLED = 3,
+ CONNMAN_TECHNOLOGY_STATE_CONNECTED = 4,
};
struct connman_technology {
@@ -255,8 +254,6 @@ static const char *state2string(enum connman_technology_state state)
return "offline";
case CONNMAN_TECHNOLOGY_STATE_AVAILABLE:
return "available";
- case CONNMAN_TECHNOLOGY_STATE_BLOCKED:
- return "blocked";
case CONNMAN_TECHNOLOGY_STATE_ENABLED:
return "enabled";
case CONNMAN_TECHNOLOGY_STATE_CONNECTED:
@@ -729,7 +726,7 @@ int __connman_technology_disable_device(struct connman_device *device)
return 0;
}
- technology->state = CONNMAN_TECHNOLOGY_STATE_BLOCKED;
+ technology->state = CONNMAN_TECHNOLOGY_STATE_OFFLINE;
state_changed(technology);
return 0;
@@ -783,7 +780,7 @@ int __connman_technology_add_rfkill(unsigned int index,
if (g_atomic_int_exchange_and_add(&technology->blocked, 1) == 0) {
technology_blocked(technology, TRUE);
- technology->state = CONNMAN_TECHNOLOGY_STATE_BLOCKED;
+ technology->state = CONNMAN_TECHNOLOGY_STATE_OFFLINE;
state_changed(technology);
}
@@ -826,7 +823,7 @@ int __connman_technology_update_rfkill(unsigned int index,
return 0;
technology_blocked(technology, blocked);
- technology->state = CONNMAN_TECHNOLOGY_STATE_BLOCKED;
+ technology->state = CONNMAN_TECHNOLOGY_STATE_OFFLINE;
state_changed(technology);
} else {
if (g_atomic_int_dec_and_test(&technology->blocked) == FALSE)