From: Bharat Bhusan Panda <bharat.panda@samsung.com>
To: 'Luiz Augusto von Dentz' <luiz.dentz@gmail.com>
Cc: linux-bluetooth@vger.kernel.org, cpgs@samsung.com
Subject: RE: [PATCH ] obexd/mas: Handle register notification open
Date: Wed, 29 Oct 2014 18:01:07 +0530 [thread overview]
Message-ID: <007001cff374$4a5f7700$df1e6500$@samsung.com> (raw)
In-Reply-To: <CABBYNZK2zKXW-HChKB3B-1JwK0j4x0xZb+BTBfKys3KOt5gWsA@mail.gmail.com>
Hi Luiz,
> -----Original Message-----
> From: linux-bluetooth-owner@vger.kernel.org [mailto:linux-bluetooth-
> owner@vger.kernel.org] On Behalf Of Luiz Augusto von Dentz
> Sent: Wednesday, October 29, 2014 5:33 PM
> To: Bharat Panda
> Cc: linux-bluetooth@vger.kernel.org; cpgs@samsung.com
> Subject: Re: [PATCH ] obexd/mas: Handle register notification open
>
> Hi,
>
> On Tue, Oct 28, 2014 at 1:58 PM, Bharat Panda
> <bharat.panda@samsung.com> wrote:
> > Changes made to handle method open for mime_notification_registration
> > ---
> > obexd/plugins/mas.c | 29 ++++++++++++++++++++++++++++-
> > 1 file changed, 28 insertions(+), 1 deletion(-)
> >
> > diff --git a/obexd/plugins/mas.c b/obexd/plugins/mas.c index
> > db40509..08d6ce7 100644
> > --- a/obexd/plugins/mas.c
> > +++ b/obexd/plugins/mas.c
> > @@ -72,6 +72,7 @@ struct mas_session {
> > GObexApparam *inparams;
> > GObexApparam *outparams;
> > gboolean ap_sent;
> > + int notification_status;
> > };
> >
> > static const uint8_t MAS_TARGET[TARGET_SIZE] = { @@ -766,6 +767,32
> @@
> > static int any_close(void *obj)
> > return 0;
> > }
> >
> > +static void *notification_registration_open(const char *name, int oflag,
> > + mode_t mode, void *driver_data, size_t *size,
> > +int *err) {
> > + struct mas_session *mas = driver_data;
> > + uint8_t status;
> > +
> > + DBG("");
> > +
> > + if (O_RDONLY) {
> > + *err = -EBADR;
> > + return NULL;
> > + }
> > +
> > + if (!g_obex_apparam_get_uint8(mas->inparams,
> MAP_AP_NOTIFICATIONSTATUS,
> > + &status)) {
>
> The line above is not aligned according to out coding style.
>
> > + *err = -EBADR;
> > + return NULL;
> > + }
> > +
> > + mas->notification_status = status;
>
> Please use uint8_t for notification_status if that is the value it can assume.
>
> > + mas->finished = TRUE;
> > + *err = 0;
> > +
> > + return mas;
> > +}
> > +
> > static struct obex_service_driver mas = {
> > .name = "Message Access server",
> > .service = OBEX_MAS,
> > @@ -824,7 +851,7 @@ static struct obex_mime_type_driver
> mime_notification_registration = {
> > .target = MAS_TARGET,
> > .target_size = TARGET_SIZE,
> > .mimetype = "x-bt/MAP-NotificationRegistration",
> > - .open = any_open,
> > + .open = notification_registration_open,
> > .close = any_close,
> > .read = any_read,
> > .write = any_write,
> > --
> > 1.9.1
I have raised a new patch with your review comments incorporated, thanks.
BR,
Bharat
prev parent reply other threads:[~2014-10-29 12:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-28 11:58 [PATCH ] obexd/mas: Handle register notification open Bharat Panda
2014-10-29 12:02 ` Luiz Augusto von Dentz
2014-10-29 12:31 ` Bharat Bhusan Panda [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='007001cff374$4a5f7700$df1e6500$@samsung.com' \
--to=bharat.panda@samsung.com \
--cc=cpgs@samsung.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).