Bug fixes galore.
diff --git a/src/libusb-glue.c b/src/libusb-glue.c
index 841a4df..394a05d 100644
--- a/src/libusb-glue.c
+++ b/src/libusb-glue.c
@@ -352,6 +352,17 @@
if (result < toread) /* short reads are common */
break;
}
+
+ // Increase counters, call callback
+ if (ptp_usb->callback_active) {
+ ptp_usb->current_transfer_complete += curread;
+ if (ptp_usb->current_transfer_callback != NULL) {
+ (void) ptp_usb->current_transfer_callback(ptp_usb->current_transfer_complete,
+ ptp_usb->current_transfer_total,
+ ptp_usb->current_transfer_callback_data);
+ }
+ }
+
if (result > 0) {
*readbytes = curread;
return (PTP_RC_OK);