Skip to content
Snippets Groups Projects
Commit 1fe62a57 authored by rswindell's avatar rswindell
Browse files

Don't retry/loop in smb_fread(), regardless of the errno value, if we're at the

end of the file.
parent 68a36bbf
No related branches found
No related tags found
No related merge requests found
......@@ -98,7 +98,7 @@ size_t SMBCALL smb_fread(smb_t* smb, void* buf, size_t bytes, FILE* fp)
while(1) {
if((ret=fread(buf,sizeof(char),bytes,fp))==bytes)
return(ret);
if(get_errno()!=EDEADLOCK && get_errno()!=EACCES)
if(feof(fp) || (get_errno()!=EDEADLOCK && get_errno()!=EACCES))
return(ret);
if(!start)
start=time(NULL);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment