Environment: ILCE-7M5 · USB · Camera Remote SDK V2.02.00 · linux-arm64 (Raspberry Pi, kernel 6.8.0-1051-raspi) · server 3.0.0
Summary
transferPollLoop() in api/server/src/device/CameraDeviceRest.cpp does have a 120-second timeout for pending transfers, but when it fires it simply erases the entry and emits nothing. A client that started a download via 202 is left waiting forever with no completion, no failure, and no log line.
The code
// CameraDeviceRest.cpp:1520-1522
for (auto it = m_pendingTransfers.begin(); it != m_pendingTransfers.end();) {
auto elapsed = std::chrono::duration_cast<std::chrono::seconds>(now - it->startTime).count();
if (elapsed > 120) { it = m_pendingTransfers.erase(it); continue; }
Compare with the success path, which does emit (line 1551-1556):
if (m_eventCallback) {
std::ostringstream oss;
oss << "{\"percent\":100,\"notify\":\"0x20093\",\"filename\":\""
<< jsonEscape(path.string()) << "\",\"synthetic\":true}";
m_eventCallback("transferProgress", oss.str());
The timeout branch has no equivalent.
Why it bites
For a transfer that never starts moving (see #40) the silence is total:
- The SDK's own
OnNotifyRemoteTransferResult(..., CrChar* filename) (line 1461) never fires, so no real transferProgress.
- The polling fallback correctly refuses to declare success, because completion requires
size == lastSize && size > 0 (line 1542) and the file is stuck at 0 bytes.
- At 120s the entry is erased with no notification.
Net effect: POST .../download returns 202 and the client can never learn the outcome by any means.
Expected
Emit a terminal event on the timeout branch — e.g. transferProgress with a failure notify code, or a dedicated transferFailed event carrying the content/file id and the reason. Log it too; right now nothing is written to the server log either.
Related minor gaps in the same area
Two callbacks next to it are unimplemented stubs (lines 1483-1488):
void CameraDeviceRest::OnNotifyRemoteTransferResult(CrInt32u, CrInt32u, CrInt8u* /*data*/, CrInt64u /*size*/) {}
void CameraDeviceRest::OnNotifyRemoteTransferContentsListChanged(CrInt32u, CrInt32u, CrInt32u) {}
The first only matters if the buffer-based GetRemoteTransferContentsData() is ever adopted, so it is currently harmless. The second means clients get no notification when new content appears on the card during a remote-transfer session, which is a real (if lower-priority) functional gap.
Related
#40 (the stuck transfer that exposes this).
Environment: ILCE-7M5 · USB · Camera Remote SDK V2.02.00 · linux-arm64 (Raspberry Pi, kernel 6.8.0-1051-raspi) · server 3.0.0
Summary
transferPollLoop()inapi/server/src/device/CameraDeviceRest.cppdoes have a 120-second timeout for pending transfers, but when it fires it simply erases the entry and emits nothing. A client that started a download via202is left waiting forever with no completion, no failure, and no log line.The code
Compare with the success path, which does emit (line 1551-1556):
The timeout branch has no equivalent.
Why it bites
For a transfer that never starts moving (see #40) the silence is total:
OnNotifyRemoteTransferResult(..., CrChar* filename)(line 1461) never fires, so no realtransferProgress.size == lastSize && size > 0(line 1542) and the file is stuck at 0 bytes.Net effect:
POST .../downloadreturns202and the client can never learn the outcome by any means.Expected
Emit a terminal event on the timeout branch — e.g.
transferProgresswith a failure notify code, or a dedicatedtransferFailedevent carrying the content/file id and the reason. Log it too; right now nothing is written to the server log either.Related minor gaps in the same area
Two callbacks next to it are unimplemented stubs (lines 1483-1488):
The first only matters if the buffer-based
GetRemoteTransferContentsData()is ever adopted, so it is currently harmless. The second means clients get no notification when new content appears on the card during aremote-transfersession, which is a real (if lower-priority) functional gap.Related
#40 (the stuck transfer that exposes this).