Properly handle conic events when going online/offline (NB#150182)
authorMario Sanchez Prada <msanchez@igalia.com>
Thu, 28 Jan 2010 18:57:03 +0000 (19:57 +0100)
committerMario Sanchez Prada <msanchez@igalia.com>
Thu, 28 Jan 2010 18:57:03 +0000 (19:57 +0100)
commit168794e00c6fa184de7d47d735a3d2c678b28193
tree27595df57035671572cd567677ff76e122fee553
parent989a6208c791b427b739f3b6df4b6701d0cf4193
Properly handle conic events when going online/offline (NB#150182)

* src/util.cc (connected_event_handler_id): New global variable to
store the handler id for the 'connection-event' callback.
(ensure_network): Store the handler id when connecting the signal.
(listen_to_conic_events): New function, to easily state when HAM
should start or stop listening to conic events.
(set_device_mode): Make sure HAM stops listening to conic events
before going to offline mode and that starts listening back to them
right after going online again.
src/util.cc