Skip to content

Commit

Permalink
Improve dp-transfer for rasPI
Browse files Browse the repository at this point in the history
  • Loading branch information
sasagawa888 committed Nov 25, 2024
1 parent b1e31e0 commit ebc5a00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extension.c
Original file line number Diff line number Diff line change
Expand Up @@ -2853,7 +2853,7 @@ int f_dp_transfer(int arglist, int th)
}
}
memset(buffer3, 0, sizeof(buffer3));
buffer3[0] = EOF;
buffer3[0] = 0x15;
m = write(sockfd[i], buffer3, 1);
if (m < 0) {
error(SYSTEM_ERR, "dp-transfer", NIL, 0);
Expand Down Expand Up @@ -2884,7 +2884,7 @@ int f_dp_receive(int arglist, int th)
int bytes_received;
while ((bytes_received =
read(sockfd[1], buffer3, sizeof(buffer3))) > 0) {
if (buffer3[bytes_received - 1] == EOF) {
if (buffer3[bytes_received - 1] == 0x15) {
buffer3[bytes_received - 1] = 0;
fwrite(buffer3, sizeof(char), bytes_received - 1, file);
break;
Expand Down

0 comments on commit ebc5a00

Please sign in to comment.