User can attempt to load a project into room with fewer ports than the
room where project was saved. This was causing ASSERT:
Wed Dec 1 04:36:45 2010: ERROR: callback_elstart: Cannot find room link port.
Wed Dec 1 04:36:45 2010: ERROR: callback_elend: ASSERT(context_ptr->port != NULL) failed. function callback_elend in ../daemon/room_load.c: 652
This changeset fixes the ASSERT by failing the project load.
The project state now is can now have more than one state. The project
unload sequence now first removes all connections, then stopps all
apps, and as last step - clears the graph. When project load fails,
ladish_room_unload_project() is not called anymore, because unloading
of room even without apps is now a multistep process. Instead, a new
function, ladish_room_clear_project(), is introduced. It is called
when project load fails and as last step in project unload.
Same or derivate project can be loaded in more than one room. This will cause more than one port
with given uuid to be added to the jack graph. This changeset uses vgraph-port_uuid pair when searching
for port that was added at earlier project load stage. For this to work, when ports are created and added
to the jack graph, the vgraph handle is stored in the port object.