Hi, 2011/12/19 Santiago Carot <sancane@xxxxxxxxx>: > Hi Anderson, > > 2011/12/19 Anderson Lizardo <anderson.lizardo@xxxxxxxxxxxxx>: >> Hi Santiago, >> >> On Mon, Dec 19, 2011 at 10:35 AM, Santiago Carot <sancane@xxxxxxxxx> wrote: >>>> Is there race condition here? Remember that plugins can also register >>>> an adapter driver. >>>> If a GATT "plugin" wants to register attributes during the probing the >>>> attribute server needs to be ready. >>>> >>> >>> I know that, remember these are transactional patches towardas >>> multi-adapter support. They only prepare the environment to start >>> coding. The patch 11 fixes this issue. In fact, one could think that >>> it should in this place but when I started coding it I thought it was >>> easier to reutilize functions which were already implemented and >>> change it after multi-adapter started working. >> Sorry: patch 10 is supposed to deal with that :P >> I don't think patch 11 fixes the architectural issue of initializing >> the attribute databases on a adapter driver. You can't guarantee it >> will be initialized prior to other adapter drivers (registered by GATT >> plugins). >> > > Patch 11 removes the adapter driver usage and initializes the GATT > server (and related stuff) in the adapter during the adapter setup, > this is operation is done before any other adapter plugin is called: > > diff --git a/src/adapter.c b/src/adapter.c > index 1a701a4..200e9d9 100644 > --- a/src/adapter.c > +++ b/src/adapter.c > @@ -2483,6 +2483,10 @@ gboolean adapter_init(struct btd_adapter *adapter) > } > > sdp_init_services_list(&adapter->bdaddr); > + > + if (main_opts.attrib_server) > + btd_adapter_gatt_server_start(adapter); > + > load_drivers(adapter); > clear_blocked(adapter); > load_devices(adapter); > > Please, corect me if I'm wrong. > >> Please take our comments as responses to the RFC :) > > Of course, and they are very welcome ;) > Regards. -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html