Require protocol version 5 to send rescan devices packet and to show rescan button in clients list

This commit is contained in:
Adam Honse committed 2025-07-04 04:24:37 -05:00
1 parent c750158286
commit 5aaadf4e5a
2 files changed
+20 -13

No files matched your search

+8 -5
View File
@@ -764,13 +764,16 @@ void NetworkClient::SendRequest_ProtocolVersion()
void NetworkClient::SendRequest_RescanDevices()
{
NetPacketHeader request_hdr;
if(GetProtocolVersion() >= 5)
{
NetPacketHeader request_hdr;
InitNetPacketHeader(&request_hdr, 0, NET_PACKET_ID_REQUEST_RESCAN_DEVICES, 0);
InitNetPacketHeader(&request_hdr, 0, NET_PACKET_ID_REQUEST_RESCAN_DEVICES, 0);
send_in_progress.lock();
send(client_sock, (char *)&request_hdr, sizeof(NetPacketHeader), MSG_NOSIGNAL);
send_in_progress.unlock();
send_in_progress.lock();
send(client_sock, (char *)&request_hdr, sizeof(NetPacketHeader), MSG_NOSIGNAL);
send_in_progress.unlock();
}
}
void NetworkClient::SendRequest_RGBController_ClearSegments(unsigned int dev_idx, int zone)