Hi
> > 
> >  But I think in connman it should have a protect mechanism to make 
> > sure that
> > > even app layer call is not right, the connman status 
> should not be 
> > > conflict. For example,  if app call SetProperity(OfflineMode) 
> > > asynchronously, before the dbus reply returns, which means the 
> > > device powering on/off operations are not done, it can call this 
> > > dbus interface again and again to set OfflineMode properity, or 
> > > other applications can call the dbus interface to do 
> this, which may 
> > > lead to this issue, too.
> > > I think that the logic process should be in connman 
> instead of app 
> > > layer, right?
> > >
> > I agree with you here, connman should be able to handle 
> this, I think 
> > we should add a pending state if an app call to turn on/off offline 
> > and conmman busy should set the pending state and any other 
> call come 
> > after that while connman still busy with the first request 
> should over 
> > write this pending state once connman finish should check 
> the pending 
> > state if it different then perform the new pending state 
> other wise it 
> > is done
> 
> Just make connman return OperationInProgess  in that case. 
> This fixes the problem in a nice way.
> 
Yes, your solution does make sense, it can record the last call operation, but 
I think it will make the logic process too complicated.
To implement it, when each device is powered done, it need to check whether 
other devices are powered done or not, and when all the devices
are powered done, it need to notify manager and then manager need to check 
whether to perform new pending state operation...... So how to notify
manager when all the devices is powered done? 
Besides, as you know, during setting offlinemode progress, user also can power 
on/off a device separately, so does device need to check it is powered 
through offlinemode setting or not? It may lead to the logic control more and 
more complicated.  So I think maybe it is not very necessary.

In my solution, it only need to care about the current connman status, so it is 
much more simpler, I think when it is in setting offline mode progress, 
If another call enters, maybe return __connman_error_in_progress is more 
reasonable than return __connman_error_permission_denied, and 
I will update it if necessary. So what's about your thinking?

> --
> Gustavo F. Padovan
> http://profusion.mobi
> 
> 
> ------------------------------
> 
> _______________________________________________
> connman mailing list
> [email protected]
> http://lists.connman.net/listinfo/connman
> 
> End of connman Digest, Vol 29, Issue 7
> **************************************
> 
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to