Message ID | 1307538557-9287-3-git-send-email-ospite@studenti.unina.it (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, 2011-06-08 at 15:09 +0200, Antonio Ospite wrote:
> From: Bastien Nocera <hadess@hadess.net>
Sent out a new patch for that which allows the same functionality, but
returns an ID instead (you can then get the btd_adapter through existing
manager functions).
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, 09 Jun 2011 15:02:32 +0100 Bastien Nocera <hadess@hadess.net> wrote: > On Wed, 2011-06-08 at 15:09 +0200, Antonio Ospite wrote: > > From: Bastien Nocera <hadess@hadess.net> > > Sent out a new patch for that which allows the same functionality, but > returns an ID instead (you can then get the btd_adapter through existing > manager functions). OK, so basically I drop 2/3 and do: adapter = manager_find_adapter_by_id(manager_get_default_adapter_id()); right? Thanks, Antonio
On Thu, 2011-06-09 at 17:00 +0200, Antonio Ospite wrote: > On Thu, 09 Jun 2011 15:02:32 +0100 > Bastien Nocera <hadess@hadess.net> wrote: > > > On Wed, 2011-06-08 at 15:09 +0200, Antonio Ospite wrote: > > > From: Bastien Nocera <hadess@hadess.net> > > > > Sent out a new patch for that which allows the same functionality, but > > returns an ID instead (you can then get the btd_adapter through existing > > manager functions). > > OK, so basically I drop 2/3 and do: > adapter = manager_find_adapter_by_id(manager_get_default_adapter_id()); > right? Yep. Hopefully my last patch will get in shortly. -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi, On Wed, Jun 08, 2011, Antonio Ospite wrote: > From: Bastien Nocera <hadess@hadess.net> > > Signed-off-by: Bastien Nocera <hadess@hadess.net> > Signed-off-by: Antonio Ospite <ospite@studenti.unina.it> > --- > src/manager.c | 5 +++++ > src/manager.h | 1 + > 2 files changed, 6 insertions(+), 0 deletions(-) I've applied this one (with the signed-off-by lines remove which we don't use and a better explanation) so you can continue with each of your work in fine-tuning/fixing your patches. Johan -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/src/manager.c b/src/manager.c index e805e0c..254ace4 100644 --- a/src/manager.c +++ b/src/manager.c @@ -262,6 +262,11 @@ static void manager_set_default_adapter(int id) DBUS_TYPE_INVALID); } +struct btd_adapter *manager_get_default_adapter(void) +{ + return manager_find_adapter_by_id(default_adapter_id); +} + static void manager_remove_adapter(struct btd_adapter *adapter) { uint16_t dev_id = adapter_get_dev_id(adapter); diff --git a/src/manager.h b/src/manager.h index 05c38b3..4f92d2f 100644 --- a/src/manager.h +++ b/src/manager.h @@ -35,6 +35,7 @@ void manager_cleanup(DBusConnection *conn, const char *path); const char *manager_get_base_path(void); struct btd_adapter *manager_find_adapter(const bdaddr_t *sba); struct btd_adapter *manager_find_adapter_by_id(int id); +struct btd_adapter *manager_get_default_adapter(void); void manager_foreach_adapter(adapter_cb func, gpointer user_data); GSList *manager_get_adapters(void); struct btd_adapter *btd_manager_register_adapter(int id);