|
From: Henrik /K. <kaa...@us...> - 2009-10-10 13:52:19
|
On Sunday 27 September 2009 12:22:00 pm Paul Eggleton wrote: > [...] > >> I've just recently changed opie-sync to do the connection to the device in >> a main sink rather than checking if it needed to be done within each >> objtype sink. However I have come accross some behaviour that I don't >> understand. It seems the main sink only connects after all of the objtype >> sinks have connected. >> > Daniel wrote: > New Implementation (proposal): > ----------------------------- > > 1. Connect: > 1.1 Main Sink connect() <----- CHANGED > 1.2 ObjType Sink connect() <----- CHANGED > > 2. Connect Done: > 2.1 Main Sink connect_done() <----- CHANGED > 2.2 ObjType Sink connect_done() <----- CHANGED > > If the point of this change is to let the main sink handle some device initialization in connect, I think it makes more sense to also allow the main sink handle device finalization in done, so I would think this sequence makes more sense: 1. Connect: 1.1 Main Sink connect() <----- AS PROPOSED 1.2 ObjType Sink connect() <----- AS PROPOSED 2. Connect Done: 2.1 ObjType Sink connect_done() <----- FIFO 2.2 Main Sink connect_done() <----- MAIN SINK LAST /Henrik |