Skip to content

Commit

Permalink
[#14] Removed use of errno in webtools::cat
Browse files Browse the repository at this point in the history
Signed-off-by: Clovis Durand <[email protected]>
  • Loading branch information
Clovel committed Dec 12, 2019
1 parent c899df8 commit 8a1ce5a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions software/src/webtools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,7 @@ void cat(const WiFiClient * const pClient, FILE * const pResource) {

/* Send the contents of the file into the socket */
while (!feof(pResource)) {
errno = 0;
send(pClient, lBuf, strlen(lBuf), 0);
if(errno) {
std::cerr << "[ERROR] <cat> send failed : errno = " << errno << ", " << strerror(errno) << std::endl;
}
htmlSend(pClient, lBuf);
fgets(lBuf, sizeof(lBuf), pResource);
}
}
Expand Down

0 comments on commit 8a1ce5a

Please sign in to comment.