Hi Luiz, On Thu, Apr 26, 2012, Luiz Augusto von Dentz wrote: > -int obc_session_get(struct obc_session *session, const char *type, > - const char *name, const char *targetfile, > - const guint8 *apparam, gint apparam_size, > - session_callback_t func, void *user_data) > +gboolean obc_session_get(struct obc_session *session, const char *type, > + const char *name, const char *targetfile, > + const guint8 *apparam, gint apparam_size, > + session_callback_t func, void *user_data, > + GError **err) > { > struct obc_transfer *transfer; > struct obc_transfer_params *params = NULL; > const char *agent; > > - if (session->obex == NULL) > - return -ENOTCONN; > + if (session->obex == NULL) { > + g_set_error(err, OBEX_IO_ERROR, -ENOTCONN, > + "Session not connected"); > + return 0; > + } > > if (apparam != NULL) { > params = g_new0(struct obc_transfer_params, 1); > @@ -971,20 +975,20 @@ int obc_session_get(struct obc_session *session, const char *type, > agent = NULL; > > transfer = obc_transfer_get(session->conn, agent, targetfile, name, > - type, params); > + type, params, err); > if (transfer == NULL) { > if (params != NULL) { > g_free(params->data); > g_free(params); > } > - return -EIO; > + return 0; > } Here's another (similar) strange thing: you're changing the function to return gboolean yet you're returning values such as 0 in it. 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