Add service error for missing PIN codes
authorMarcel Holtmann <marcel@holtmann.org>
Sun, 5 Jul 2009 21:51:22 +0000 (14:51 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Sun, 5 Jul 2009 21:51:22 +0000 (14:51 -0700)
include/service.h
src/service.c

index 781ee0c..75df75f 100644 (file)
@@ -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;
index 1e06074..0b435a3 100644 (file)
@@ -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;
 }