Hi Denis,

On 12:32 Fri 05 Apr, Denis Kenzior wrote:
> >
> >+int ofono_handsfree_get_codecs(unsigned char *buffer, int buffer_len)
> >+{
> >+    int len;
> >+
> >+    if (agent == NULL)
> >+            return -EIO;
> >+
> >+    len = MIN(buffer_len, agent->codecs_len);
> >+    memcpy(buffer, agent->codecs, len);
> >+
> >+    return len;
> >+}
> >+
> 
> Do we really want to memcpy here or return a const unsigned char
> array?  Also, right now we explicitly only support CVSD and mSBC, so
> this is overkill.

As we can assume that we always support CVSD, one idea is to have something
like ofono_handsfree_audio_has_msbc() instead of the get_codecs() function.
How does it sound?

> 
> >  static void agent_free(struct agent *agent)
> >  {
> >     if (agent->watch>  0)
> 
> Regards,
> -Denis


Cheers,
-- 
Vinicius
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to