Hi Claudio, 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? Regards, -- Anderson Lizardo Instituto Nokia de Tecnologia - INdT Manaus - Brazil -- 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