} else if (transfer->status == LIBUSB_TRANSFER_COMPLETED) {
sr_dbg("Got %d-byte packet.", transfer->actual_length);
if (transfer->actual_length == DMM_DATA_SIZE) {
victor_dmm_receive_data(sdi, transfer->buffer);
if (sr_sw_limits_check(&devc->limits))
} else if (transfer->status == LIBUSB_TRANSFER_COMPLETED) {
sr_dbg("Got %d-byte packet.", transfer->actual_length);
if (transfer->actual_length == DMM_DATA_SIZE) {
victor_dmm_receive_data(sdi, transfer->buffer);
if (sr_sw_limits_check(&devc->limits))
if (sdi->status == SR_ST_STOPPING) {
usb_source_remove(sdi->session, drvc->sr_ctx);
if (sdi->status == SR_ST_STOPPING) {
usb_source_remove(sdi->session, drvc->sr_ctx);