Hi Samuel, 2010/8/18 Samuel Ortiz <[email protected]>: >> Create modem only after Modem.GetProperties succeeds, thus avoiding races >> with Modem.PropertyChanged signal. > So I've commented on this one and my concernas about the Powered property not > being handled anymore, except when creating the modem.
I must have missed that, good thing you catched it. The current code tries to set Modem.Powered after there is a change in ModemManager.Modems list. The current behavior and my patch differ only if there are multiple modems in the device. In my patch the Modem.Powered is tried only once. If we need retries on Modem.Powered, I think it is much better to handle explicitly than as a side effect of plugging in another modem. > I have another comment: > >> + new_modem = add_modem(path); >> + if (new_modem == NULL) >> + goto done; > I don't like the fact that add_modem returns NULL when failing but also when > the modem already exists. I would prefer to keep the semantics as they are > right now, and handle the below code from add_modem(). So add_modem() > prototype would change but will always return the right modem when not failing > and NULL otherwise. Is there a need for another code path for creating modems? If so, I'm happy to duplicate the hash table lookup in modem_properties_reply(). -- Pekka.Pessi mail at nokia.com _______________________________________________ connman mailing list [email protected] http://lists.connman.net/listinfo/connman
