diff options
author | Linus Walleij <triad@df.lth.se> | 2006-08-27 16:10:38 +0000 |
---|---|---|
committer | Linus Walleij <triad@df.lth.se> | 2006-08-27 16:10:38 +0000 |
commit | 47754c58f36e25565391ca40c749e836e5ebb472 (patch) | |
tree | c5cb35d31c399d65a14b0685d70f59fbd82c771e /src/libmtp.c | |
parent | 4af6fbe6815238230dca9b5c2fe4d5f30239dcf6 (diff) | |
download | libmtp-47754c58f36e25565391ca40c749e836e5ebb472.tar.gz |
Perfect callbacks
Diffstat (limited to 'src/libmtp.c')
-rw-r--r-- | src/libmtp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libmtp.c b/src/libmtp.c index c52fef1..a6ddda0 100644 --- a/src/libmtp.c +++ b/src/libmtp.c @@ -2190,7 +2190,7 @@ int LIBMTP_Send_Track_From_File_Descriptor(LIBMTP_mtpdevice_t *device, } ptp_usb->callback_active = 1; - ptp_usb->current_transfer_total = metadata->filesize+12; // 12 = USB header size + ptp_usb->current_transfer_total = metadata->filesize+12+12; // 12 = USB header size, two commands ptp_usb->current_transfer_complete = 0; ptp_usb->current_transfer_callback = callback; ptp_usb->current_transfer_callback_data = data; @@ -2363,7 +2363,7 @@ int LIBMTP_Send_File_From_File_Descriptor(LIBMTP_mtpdevice_t *device, } ptp_usb->callback_active = 1; - ptp_usb->current_transfer_total = filedata->filesize+12; // 12 = USB header size + ptp_usb->current_transfer_total = filedata->filesize+12+12; // 12 = USB header size, two commands ptp_usb->current_transfer_complete = 0; ptp_usb->current_transfer_callback = callback; ptp_usb->current_transfer_callback_data = data; |