Skip to content
Snippets Groups Projects
Commit 5ed064a3 authored by rswindell's avatar rswindell
Browse files

Only log sendfile error if sendfilesocket returns < 0, sending a 0-byte file

was reporting an error with a bogus/confusing errno value.
Deuce: where is the temp_dir/sbbs_ssjs.*.html file being deleted?
parent 364207ee
Branches
Tags
No related merge requests found
......@@ -948,7 +948,7 @@ static int sock_sendfile(SOCKET socket,char *path)
if((file=open(path,O_RDONLY|O_BINARY))==-1)
lprintf(LOG_WARNING,"%04d !ERROR %d opening %s",socket,errno,path);
else {
if((ret=sendfilesocket(socket, file, &offset, 0)) < 1) {
if((ret=sendfilesocket(socket, file, &offset, 0)) < 0) {
lprintf(LOG_DEBUG,"%04d !ERROR %d sending %s"
, socket, errno, path);
ret=0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment