service: Don't trigger autoconnect when neither service is preferred
authorPatrik Flykt <patrik.flykt@linux.intel.com>
Wed, 17 Oct 2012 10:34:20 +0000 (13:34 +0300)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Thu, 18 Oct 2012 10:26:37 +0000 (13:26 +0300)
Don't trigger a new autoconnect when neither the default nor the new
service is preferred. Rely on the fact that normal autoconnect selection
mechanism has done the work for us already.

src/service.c

index 3417e89..5dee4cd 100644 (file)
@@ -4941,7 +4941,6 @@ static int service_update_preferred_order(struct connman_service *default_servic
                                return 0;
                        }
                }
-               return -EAGAIN;
        }
 
        return -EALREADY;
@@ -4977,8 +4976,6 @@ static int service_indicate_state(struct connman_service *service)
                                service, new_state);
                if (result == -EALREADY)
                        return result;
-               if (result == -EAGAIN)
-                       __connman_service_auto_connect();
        }
 
        if (old_state == CONNMAN_SERVICE_STATE_ONLINE)