On Tue, Oct 16, 2012 at 8:58 AM, Luiz Augusto von Dentz <luiz.dentz@xxxxxxxxx> wrote: > From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> > > Some devices w.g. Sony MW600 will stop using certain commands if an > error happen, so the code now just fake a player and once a real > player is registered it takes place of the fake one. > --- > audio/avrcp.c | 91 ++++++++++++++++++++++++++++++++++++++++++++++++----------- > 1 file changed, 74 insertions(+), 17 deletions(-) > > diff --git a/audio/avrcp.c b/audio/avrcp.c > index 5a18cb4..cd57358 100644 > --- a/audio/avrcp.c > +++ b/audio/avrcp.c > @@ -493,6 +493,28 @@ void avrcp_player_event(struct avrcp_player *player, uint8_t id, void *data) > return; > } > > +static const char *player_get_string(struct avrcp_player *player, uint32_t attr) > +{ Instead of adding these wrapper functions, did you consider having a default_avrcp_player with all hooks set and player pointing to it if there's no player registered? Lucas De Marchi -- 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