diff mbox series

[v2,16/60] service: Add online check failure service error enumeration and string.

Message ID 20231221064007.2347566-17-gerickson@nuovations.com (mailing list archive)
State Superseded
Headers show
Series Complete 'continuous' Online Check Mode Implementation. | expand

Commit Message

Grant Erickson Dec. 21, 2023, 6:39 a.m. UTC
This adds the 'CONNMAN_SERVICE_ERROR_ONLINE_CHECK_FAILED' service
error enumeration and "online-check-failed" string, used for services
that have met or exceeded the continuous mode online check failure
threshold.
---
 include/service.h | 19 ++++++++++---------
 src/service.c     |  2 ++
 2 files changed, 12 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/include/service.h b/include/service.h
index 69f93574bafb..bfa3ab2592e4 100644
--- a/include/service.h
+++ b/include/service.h
@@ -71,15 +71,16 @@  enum connman_service_state {
 };
 
 enum connman_service_error {
-	CONNMAN_SERVICE_ERROR_UNKNOWN        = 0,
-	CONNMAN_SERVICE_ERROR_OUT_OF_RANGE   = 1,
-	CONNMAN_SERVICE_ERROR_PIN_MISSING    = 2,
-	CONNMAN_SERVICE_ERROR_DHCP_FAILED    = 3,
-	CONNMAN_SERVICE_ERROR_CONNECT_FAILED = 4,
-	CONNMAN_SERVICE_ERROR_LOGIN_FAILED  = 5,
-	CONNMAN_SERVICE_ERROR_AUTH_FAILED    = 6,
-	CONNMAN_SERVICE_ERROR_INVALID_KEY    = 7,
-	CONNMAN_SERVICE_ERROR_BLOCKED        = 8,
+	CONNMAN_SERVICE_ERROR_UNKNOWN             = 0,
+	CONNMAN_SERVICE_ERROR_OUT_OF_RANGE        = 1,
+	CONNMAN_SERVICE_ERROR_PIN_MISSING         = 2,
+	CONNMAN_SERVICE_ERROR_DHCP_FAILED         = 3,
+	CONNMAN_SERVICE_ERROR_CONNECT_FAILED      = 4,
+	CONNMAN_SERVICE_ERROR_LOGIN_FAILED        = 5,
+	CONNMAN_SERVICE_ERROR_AUTH_FAILED         = 6,
+	CONNMAN_SERVICE_ERROR_INVALID_KEY         = 7,
+	CONNMAN_SERVICE_ERROR_BLOCKED             = 8,
+	CONNMAN_SERVICE_ERROR_ONLINE_CHECK_FAILED = 9,
 };
 
 enum connman_service_proxy_method {
diff --git a/src/service.c b/src/service.c
index fb901ef16c9b..2599acd832ce 100644
--- a/src/service.c
+++ b/src/service.c
@@ -384,6 +384,8 @@  static const char *error2string(enum connman_service_error error)
 		return "invalid-key";
 	case CONNMAN_SERVICE_ERROR_BLOCKED:
 		return "blocked";
+	case CONNMAN_SERVICE_ERROR_ONLINE_CHECK_FAILED:
+		return "online-check-failed";
 	}
 
 	return NULL;