service: Change the debug print location to be more useful
authorJukka Rissanen <jukka.rissanen@linux.intel.com>
Wed, 24 Aug 2011 14:02:00 +0000 (17:02 +0300)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 12 Sep 2011 09:40:46 +0000 (11:40 +0200)
src/service.c

index 1fbd12e..62ad20a 100644 (file)
@@ -3990,9 +3990,6 @@ static int service_indicate_state(struct connman_service *service)
        old_state = service->state;
        new_state = combine_state(service->state_ipv4, service->state_ipv6);
 
-       if (old_state == new_state)
-               return -EALREADY;
-
        DBG("service %p old %s - new %s/%s => %s",
                                        service,
                                        state2string(old_state),
@@ -4000,6 +3997,9 @@ static int service_indicate_state(struct connman_service *service)
                                        state2string(service->state_ipv6),
                                        state2string(new_state));
 
+       if (old_state == new_state)
+               return -EALREADY;
+
        service->state = new_state;
        state_changed(service);