All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Danis <frederic.danis@linux.intel.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [RFC v3 1/6] audio: Move tel drivers to DBus interface
Date: Mon, 05 Dec 2011 14:31:14 +0100	[thread overview]
Message-ID: <4EDCC7A2.1020008@linux.intel.com> (raw)
In-Reply-To: <CABBYNZJ75hK0eBkHFJh7kQncsoxDYHc3TGgk6UTAPSPYP_bDbA@mail.gmail.com>

Hello Luiz,

Le 05/12/2011 10:00, Luiz Augusto von Dentz a écrit :
> Hi Frédéric,
>
> 2011/12/1 Frédéric Danis<frederic.danis@linux.intel.com>:
>> +static void free_agent(struct tel_agent *agent)
>> +{
>> +       if (agent->name)
>> +               g_free(agent->name);
>> +
>> +       if (agent->path)
>> +               g_free(agent->path);
>
> You can call g_free directly.

OK

>> +       g_free(agent);
>> +}
>> +

>> +       if (find_agent(NULL, NULL, uuid) != NULL)
>> +               return btd_error_already_exists(msg);
>> +
>> +       /* initialize agent properties */
>> +       for (i=0 ; i<4; i++) {
>> +               if (strcasecmp(uuid, default_properties[i].uuid) == 0) {
>> +                       agent = g_new0(struct tel_agent, 1);
>> +                       agent->properties =&default_properties[i];
>> +                       agent->name = g_strdup(sender);
>> +                       agent->path = g_strdup(path);
>> +                       agent->version = version;
>> +                       agent->features = features;
>> +                       break;
>> +               }
>> +       }
>> +
>> +       if (i == 4)
>> +               return btd_error_invalid_args(msg);
>
> I guess you can use sizeof(default_properties)/sizeof(struct
> default_agent) to calculate the size of the array, anyway I would
> probably split this part in a separate function e.g. agent_new.

OK

>> +       DBG("Register agent : %s%s for %s version 0x%04X with features 0x%02X",
>> +                                       sender, path, uuid, version, features);
>> +
>> +       telsrv.servers = g_slist_append(telsrv.servers, agent);
>> +
>> +       return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
>> +}
>> +

>> diff --git a/doc/assigned-numbers.txt b/doc/assigned-numbers.txt
>> index cda934c..120d7ea 100644
>> --- a/doc/assigned-numbers.txt
>> +++ b/doc/assigned-numbers.txt
>> @@ -8,6 +8,7 @@ avoid conflicts.
>>   Profile                Channel
>>   -----------------------
>>   DUN            1
>> +HSP HS         6
>
> Why not HFP HS?
>
>>   HFP HF         7
>>   OPP            9
>>   FTP            10

I am not sure to understand your comment as I do not touch HFP assigned 
numbers. In HFP specification, roles are Hands-Free unit (HFP HF) and 
Audio Gateway (HFP AG).

Regards

Fred



-- 
Frederic Danis                            Open Source Technology Centre
frederic.danis@intel.com                              Intel Corporation


  reply	other threads:[~2011-12-05 13:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-01 15:13 [RFC v3 0/6] Add org.bluez.Telephony interface Frédéric Danis
2011-12-01 15:14 ` [RFC v3 1/6] audio: Move tel drivers to DBus interface Frédéric Danis
2011-12-05  9:00   ` Luiz Augusto von Dentz
2011-12-05 13:31     ` Frederic Danis [this message]
2011-12-01 15:14 ` [RFC v3 2/6] audio: Remove tel drivers Frédéric Danis
2011-12-01 15:14 ` [RFC v3 3/6] audio: Remove maemo5 tel driver Frédéric Danis
2011-12-01 15:14 ` [RFC v3 4/6] audio: Remove maemo6 " Frédéric Danis
2011-12-01 15:14 ` [RFC v3 5/6] audio: Move HFP/HSP AG servers to telephony.c Frédéric Danis
2011-12-01 15:14 ` [RFC v3 6/6] audio: Send transport path to telephony agent Frédéric Danis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EDCC7A2.1020008@linux.intel.com \
    --to=frederic.danis@linux.intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.