[fibre-cpp] fix function calls with multiple args

This commit is contained in:
Samuel Sadok
2021-04-14 22:03:58 -04:00
committed by PAJohnson
parent eb2d8573ef
commit fe71fe8510
7 changed files with 12 additions and 6 deletions
@@ -621,6 +621,7 @@ std::variant<LegacyCallContext::ContinueWithApp, LegacyCallContext::ContinueWith
return ContinueWithApp{kFibreInternalError, app_tx_end_, app_rx_buf_.begin()};
}
transcoded_pos += arg.protocol_size;
tx_pos_ += arg.app_size;
}
tx_buf_ = transcoded;
@@ -647,6 +648,7 @@ std::variant<LegacyCallContext::ContinueWithApp, LegacyCallContext::ContinueWith
return ContinueWithApp{kFibreInternalError, app_tx_end_, app_rx_buf_.begin()};
}
transcoded_pos += arg.app_size;
rx_pos_ += arg.protocol_size;
}
rx_buf_ = transcoded;
+1 -1
View File
@@ -10,7 +10,7 @@
DEFINE_LOG_TOPIC(LIBFIBRE);
USE_LOG_TOPIC(LIBFIBRE);
static const struct LibFibreVersion libfibre_version = { 0, 1, 1 };
static const struct LibFibreVersion libfibre_version = { 0, 1, 2 };
class FIBRE_PRIVATE ExternalEventLoop final : public fibre::EventLoop {
public:
@@ -22,7 +22,7 @@ USE_LOG_TOPIC(USB);
// This probably has no noteworthy effect since we automatically restart
// timed out operations anyway.
constexpr unsigned int kBulkTimeoutMs = 2000;
constexpr unsigned int kBulkTimeoutMs = 10000;
// Only relevant for platforms don't support hotplug detection and thus
// need polling.
@@ -635,6 +635,9 @@ void LibusbBulkEndpoint<TRes>::on_transfer_finished() {
// Sometimes it's LIBUSB_TRANSFER_STALL, sometimes
// LIBUSB_TRANSFER_ERROR. Therefore we just check if the device
// is still present to determine which error code to return.
// TODO: this detection doesn't really work. The device is still in the
// device list at this point when it just got unplugged. For now we
// just ignore transfer errors.
bool found = false;
@@ -644,6 +647,7 @@ void LibusbBulkEndpoint<TRes>::on_transfer_finished() {
if (n_devices >= 0) {
for (size_t i = 0; i < (size_t)n_devices; ++i) {
if (list[i] == dev) {
// found = true;
break;
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.