Hi,

> > 
> >  src/service.c | 11 +++++++++++
> >  1 file changed, 11 insertions(+)
> > 
> > diff --git a/src/service.c b/src/service.c
> > index 9406bc3..9740738 100644
> > --- a/src/service.c
> > +++ b/src/service.c
> > @@ -3957,6 +3957,16 @@ static DBusMessage *connect_service(DBusConnection 
> > *conn,
> >      if (service->pending)
> >          return __connman_error_in_progress(msg);
> >  
> > +    if (is_connected(service)) {
> > +        err = -EISCONN;
> > +        goto done;
> > +    }
> > +
> > +    if (is_connecting(service)) {
> > +        err = -EALREADY;
> > +        goto done;
> > +    }
> > +
> 
> This one will work as well. But to avoid confusion, we'd like to call
> __connman_service_connect() from everywhere in order to have one and
> only one place in the code where all necessary checks are done.
> 

Yes, agree with you.

Thanks,
Chengyi
                                          
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to