From: Johan Hedberg <johan.hedberg@nokia.com>
To: Dmitriy Paliy <dmitriy.paliy@nokia.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Add 'Protocol not supported' error in a2dp_add_sep
Date: Thu, 17 Mar 2011 14:44:23 +0200 [thread overview]
Message-ID: <20110317124423.GB12238@jh-x301> (raw)
In-Reply-To: <1300347949.2509.11.camel@dp-x301>
Hi Dmitriy,
On Thu, Mar 17, 2011, Dmitriy Paliy wrote:
> On Wed, 2011-03-16 at 14:01 +0200, ext Dmitriy Paliy wrote:
> > 'Protocol not supported' error code is added to registeration of A2DP
> > end-points. Error response org.bluez.Error.NotSupported instead of
> > org.bluez.Error.InvalidArguments is used when SEP registration fails
> > due to disabled corresponding interface in audio.conf.
>
> Seems like there were some comment about this patch that I missed. Could
> anybody post a reply with them to this email?
The main concern raised on IRC was about the convention of returning an
integer error through a pointer parameter instead of the return value of
the function. Usually it's better to have integer errors in the return
value, but as the main purpose of this function is to create and return
and object and checking for the exact error is a secondary concern
(which isn't always needed). So I think it's kind of ok in this case and
I've therefore pushed the patch upstream. It'd be nice if we had similar
macros as the kernel has for encoding POSIX errno's into a pointer
value. Then this kind of issue wouldn't exist.
Johan
prev parent reply other threads:[~2011-03-17 12:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-16 12:01 [PATCH] Add 'Protocol not supported' error in a2dp_add_sep Dmitriy Paliy
2011-03-17 7:45 ` Dmitriy Paliy
2011-03-17 12:44 ` Johan Hedberg [this message]
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=20110317124423.GB12238@jh-x301 \
--to=johan.hedberg@nokia.com \
--cc=dmitriy.paliy@nokia.com \
--cc=linux-bluetooth@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox