Skip to content
Snippets Groups Projects
Commit a59f9b21 authored by Morris Jette's avatar Morris Jette
Browse files

Improve logging of save_read

Add logging of premature EOF
parent 1eb32d90
No related branches found
No related tags found
No related merge requests found
......@@ -1330,9 +1330,11 @@ extern char *rpc_num2string(uint16_t opcode);
int rc; \
while (remaining > 0) { \
rc = read(fd, ptr, remaining); \
if ((rc == 0) && (remaining == size)) \
if ((rc == 0) && (remaining == size)) { \
debug("%s:%d: %s: safe_read EOF", \
__FILE__, __LINE__, __CURRENT_FUNC__); \
goto rwfail; \
else if (rc == 0) { \
} else if (rc == 0) { \
debug("%s:%d: %s: safe_read (%d of %d) EOF", \
__FILE__, __LINE__, __CURRENT_FUNC__, \
remaining, (int)size); \
......
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