Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
hampii committed Aug 16, 2024
2 parents 448303d + e68beda commit e7c4985
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/server/communication.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,13 @@ void sendPipelinedDataToClient(uint64_t wpTotal, uint64_t numSamples, uint64_t c
sendSamplesTotal += chunk;

// Check if SCPI commands are waiting
rc = recv(clifd, smbuffer, sizeof (smbuffer), MSG_DONTWAIT);
if (rc > 0) {
SCPI_Input(&scpi_context, smbuffer, rc);
printf("Handled SCPI in loop\n");
}
do {
rc = recv(clifd, smbuffer, sizeof (smbuffer), MSG_DONTWAIT);
if (rc > 0) {
SCPI_Input(&scpi_context, smbuffer, rc);
printf("Handled SCPI in loop\n");
}
} while (rc > 0);

}
setServerMode(ACQUISITION); // Maybe get and reset previous mode later. Atm it has to be ACQUISITION anyways
Expand Down

0 comments on commit e7c4985

Please sign in to comment.