From: Mikel Astiz <mikel.astiz@xxxxxxxxxxxx> There is no reason to have inconsistent behavior between GetFile and PutFile, in FileTransfer D-Bus API. Before this change, PutFile reported success immediately after queueing the transfer, even though the D-Bus signature includes the async flag. --- client/ftp.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/client/ftp.c b/client/ftp.c index b7b5081..c4ad33b 100644 --- a/client/ftp.c +++ b/client/ftp.c @@ -143,7 +143,7 @@ static const GMarkupParser parser = { NULL }; -static void get_file_callback(struct obc_session *session, +static void transfer_callback(struct obc_session *session, struct obc_transfer *transfer, GError *err, void *user_data) { @@ -270,7 +270,7 @@ static DBusMessage *get_file(DBusConnection *connection, if (transfer == NULL) goto fail; - if (obc_session_queue(session, transfer, get_file_callback, message, + if (obc_session_queue(session, transfer, transfer_callback, message, TRUE, &err)) { dbus_message_ref(message); return NULL; @@ -306,8 +306,11 @@ static DBusMessage *put_file(DBusConnection *connection, if (transfer == NULL) goto fail; - if (obc_session_queue(session, transfer, NULL, NULL, TRUE, &err)) - return dbus_message_new_method_return(message); + if (obc_session_queue(session, transfer, transfer_callback, message, + TRUE, &err)) { + dbus_message_ref(message); + return NULL; + } fail: reply = g_dbus_create_error(message, "org.openobex.Error.Failed", "%s", -- 1.7.7.6 -- 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