Hi Daniel, Samuel and Marcel,

I reworked Daniel's patches. So the 3 first ones are exactly doing the same, 
it's just updated to apply with latest master's HEAD.

The big change is in patch 4, and I think this is the right way to proceed: 
separating ipconfig state handling and service state handling.
It is way much cleaner like that, easier to maintain and so on.

Current tests prooved it works, though I did not go through full test cases: 
ipv4 only and then ipv4/ipv6 (in auto). So it still requires testing but 
I think we are definitely in the right path.

In logs, we will get things like for instance: 

connmand[27885]: src/service.c:__connman_service_lookup_from_network() network 
0x1fbd9f0
connmand[27885]: src/service.c:__connman_service_ipconfig_indicate_state() 
service 0x1fbdaf0 (wifi_a088b4318bd8_496e74656c_managed_psk) state 2 
(association) type 1 (IPv4)
connmand[27885]: src/service.c:__connman_service_indicate_state() service 
0x1fbdaf0 old (null) - new association/idle => association
connmand[27885]: src/service.c:__connman_service_ipconfig_indicate_state() 
service 0x1fbdaf0 (wifi_a088b4318bd8_496e74656c_managed_psk) state 2 
(association) type 2 (IPv6)
(...)
connmand[27885]: src/service.c:__connman_service_ipconfig_indicate_state() 
service 0x1fbdaf0 (wifi_a088b4318bd8_496e74656c_managed_psk) state 4 
(ready) type 2 (IPv6)
connmand[27885]: src/service.c:__connman_service_indicate_state() service 
0x1fbdaf0 old association - new association/ready => ready
connmand[27885]: src/service.c:service_save() service 0x1fbdaf0
connmand[27885]: src/service.c:__connman_service_lookup_from_network() network 
0x1fbd9f0
connmand[27885]: src/service.c:__connman_service_ipconfig_indicate_state() 
service 0x1fbdaf0 (wifi_a088b4318bd8_496e74656c_managed_psk) state 3 
(configuration) type 1 (IPv4)
(...)
connmand[27885]: src/service.c:__connman_service_ipconfig_indicate_state() 
service 0x1fbdaf0 (wifi_a088b4318bd8_496e74656c_managed_psk) state 4 
(ready) type 1 (IPv4)
(...)
connmand[27885]: src/service.c:__connman_service_ipconfig_indicate_state() 
service 0x1fbdaf0 (wifi_a088b4318bd8_496e74656c_managed_psk) state 5 
(online) type 1 (IPv4)
connmand[27885]: src/service.c:__connman_service_indicate_state() service 
0x1fbdaf0 old ready - new online/ready => online

Please review,

Cheers,

Tomasz Bursztyka (4):
  monitor-connman: Parse Notification messages.
  service: Add __connman_service_ipconfig_indicate_state().
  service: Use __connman_service_ipconfig_indicate_state()
  service: separating the ipconfig state handling logic and the service
    state one.

 src/connection.c     |    6 +-
 src/connman.h        |    8 +-
 src/location.c       |    2 +-
 src/network.c        |   52 +++++---
 src/provider.c       |    6 +-
 src/service.c        |  318 +++++++++++++++++++++++---------------------------
 test/monitor-connman |   47 +++++++-
 7 files changed, 236 insertions(+), 203 deletions(-)

-- 
1.7.3.4

_______________________________________________
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman

Reply via email to