Skip to content

Commit

Permalink
Update visionipc_client.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
sshane authored Dec 17, 2024
1 parent 434ed23 commit 9f2822c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion msgq/visionipc/visionipc_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ std::set<VisionStreamType> VisionIpcClient::getAvailableStreams(const std::strin

VisionStreamType available_streams[VISION_STREAM_MAX] = {};
r = ipc_sendrecv_with_fds(false, socket_fd, &available_streams, sizeof(available_streams), nullptr, 0, nullptr);
assert((r >= 0) && (r % sizeof(VisionStreamType) == 0));
if (r < 0) {
close(socket_fd);
return {};
}
assert(r % sizeof(VisionStreamType) == 0);
close(socket_fd);
return std::set<VisionStreamType>(available_streams, available_streams + r / sizeof(VisionStreamType));
}
Expand Down

0 comments on commit 9f2822c

Please sign in to comment.