Re: [PATCH BlueZ] btio: Rescue lost errorneous numbers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Lizardo,

On Mon, Jul 23, 2012, Anderson Lizardo wrote:
> On Mon, Jul 23, 2012 at 10:36 AM, Claudio Takahasi
> <claudio.takahasi@xxxxxxxxxxxxx> wrote:
> >  #define ERROR_FAILED(gerr, str, err) \
> > -               g_set_error(gerr, BT_IO_ERROR, BT_IO_ERROR_FAILED, \
> > +               g_set_error(gerr, BT_IO_ERROR, err, \
> >                                 str ": %s (%d)", strerror(err), err)
> > [...]
> >                 if (err < 0)
> > -                       g_set_error(&gerr, BT_IO_ERROR,
> > -                                       BT_IO_ERROR_CONNECT_FAILED, "%s (%d)",
> > -                                       strerror(-err), -err);
> > -       } else if (cond & (G_IO_HUP | G_IO_ERR))
> > -               g_set_error(&gerr, BT_IO_ERROR, BT_IO_ERROR_CONNECT_FAILED,
> > -                               "HUP or ERR on socket");
> > +                       g_set_error(&gerr, BT_IO_ERROR, -err, "%s (%d)",
> > +                                                       strerror(-err), -err);
> 
> why not use the ERROR_FAILED() macro here?
> 
> >         if (err < 0) {
> > -               g_set_error(gerr, BT_IO_ERROR, BT_IO_ERROR_CONNECT_FAILED,
> > -                               "connect: %s (%d)", strerror(-err), -err);
> > +               g_set_error(gerr, BT_IO_ERROR, -err, "connect: %s (%d)",
> > +                                                       strerror(-err), -err);
> 
> and here?

Good point. Unfortunately I didn't notice this before applying so please
(Claudio) send a fix on top of your patch.

Johan
--
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


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux