session: Add a list of pending connect/disconnect actions
authorPatrik Flykt <patrik.flykt@linux.intel.com>
Fri, 28 Oct 2011 08:04:48 +0000 (11:04 +0300)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 28 Oct 2011 19:37:16 +0000 (21:37 +0200)
commit3198dcb0a7f46edbe217c648fce46177375955a9
tree3d7dec2d1d9527552a0b695fcfebc9f83c5e79e4
parent8f1f78f53bc03c99c7e065af3e71fcd90ea7829c
session: Add a list of pending connect/disconnect actions

deselect_service() and select_offline_service() want to clear
up the session state machinery by setting up a zero second
timeout function thereby letting the main loop run once through
all waiting actions. Unfortunately, if a service is being
removed meantime, the service structure stored in the timeout
functions will become invalid.

This is fixed by adding a list of pending connect/disconnect
actions per struct service_entry and cancelling all of them
if the service is removed.

Fixes BMC#22879
src/session.c