[PATCH] service: Set service state idle when creating from provider

Daniel Wagner wagi at monom.org
Tue Feb 14 04:40:50 PST 2012


From: Daniel Wagner <daniel.wagner at bmw-carit.de>

When a new service is created from a provider, the service state
should be initialized. We do this also when creating from a
network object.
---
 src/service.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/service.c b/src/service.c
index b0acd5f..1f99b34 100644
--- a/src/service.c
+++ b/src/service.c
@@ -5365,6 +5365,7 @@ __connman_service_create_from_provider(struct connman_provider *provider)
 	service->userconnect = TRUE;
 
 	service->state_ipv4 = service->state_ipv6 = CONNMAN_SERVICE_STATE_IDLE;
+	service->state = combine_state(service->state_ipv4, service->state_ipv6);
 
 	str = connman_provider_get_string(provider, "Name");
 	if (str != NULL) {
-- 
1.7.9.48.g85da4d




More information about the connman mailing list