summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-07-05 14:51:22 -0700
committerMarcel Holtmann <marcel@holtmann.org>2009-07-05 14:51:22 -0700
commit1642eaee45116a86f144daba93dd50b682745f20 (patch)
tree4104806876fa8f09946124d9331bd94e2621b366
parented1eda8841c98f34cbbf89e2dd85db2441e7dfe6 (diff)
downloadconnman-1642eaee45116a86f144daba93dd50b682745f20.tar.gz
connman-1642eaee45116a86f144daba93dd50b682745f20.tar.bz2
connman-1642eaee45116a86f144daba93dd50b682745f20.zip
Add service error for missing PIN codes
-rw-r--r--include/service.h1
-rw-r--r--src/service.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/include/service.h b/include/service.h
index 781ee0c1..75df75fc 100644
--- a/include/service.h
+++ b/include/service.h
@@ -69,6 +69,7 @@ enum connman_service_state {
enum connman_service_error {
CONNMAN_SERVICE_ERROR_UNKNOWN = 0,
CONNMAN_SERVICE_ERROR_DHCP_FAILED = 1,
+ CONNMAN_SERVICE_ERROR_PIN_MISSING = 2,
};
struct connman_service;
diff --git a/src/service.c b/src/service.c
index 1e06074d..0b435a3b 100644
--- a/src/service.c
+++ b/src/service.c
@@ -186,6 +186,8 @@ static const char *error2string(enum connman_service_error error)
break;
case CONNMAN_SERVICE_ERROR_DHCP_FAILED:
return "dhcp-failed";
+ case CONNMAN_SERVICE_ERROR_PIN_MISSING:
+ return "pin-missing";
}
return NULL;
@@ -195,6 +197,8 @@ static enum connman_service_error string2error(const char *error)
{
if (g_strcmp0(error, "dhcp-failed") == 0)
return CONNMAN_SERVICE_ERROR_DHCP_FAILED;
+ else if (g_strcmp0(error, "pin-missing") == 0)
+ return CONNMAN_SERVICE_ERROR_PIN_MISSING;
return CONNMAN_SERVICE_ERROR_UNKNOWN;
}