Discussion:
[PATCH] Resetting the service state to idle on Error event
(too old to reply)
Naveen Singh
2015-10-09 01:33:36 UTC
Permalink
From: Naveen Singh <***@nestlabs.com>

It is been seen that if the service state has transitioned to failure
there is no way for it to get it back to idle. This fix allows the state
to be transitioned back to idle as part of handling clear_property handler
for error event. Since there is no guarantee that error event would be coupled
with the failure event, on getting either of these events application can clear
the error event which would bring the state back to idle and will allow
connections.
---
src/service.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/src/service.c b/src/service.c
index 196f6b5..16832fa 100644
--- a/src/service.c
+++ b/src/service.c
@@ -3532,6 +3532,7 @@ static DBusMessage *clear_property(DBusConnection *conn,

g_get_current_time(&service->modified);
service_save(service);
+ __connman_service_clear_error(service);
} else
return __connman_error_invalid_property(msg);
--
2.5.3
Patrik Flykt
2015-10-09 08:13:57 UTC
Permalink
Post by Naveen Singh
It is been seen that if the service state has transitioned to failure
there is no way for it to get it back to idle. This fix allows the state
to be transitioned back to idle as part of handling clear_property handler
for error event.
NACK. Service states are internal to ConnMan and not resettable by the
user.

Patrik

Loading...