Skip to content

Commit

Permalink
fix printouts
Browse files Browse the repository at this point in the history
  • Loading branch information
moticless committed Dec 10, 2023
1 parent 2652500 commit 30e8a96
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions api/librdb-ext-api.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ typedef enum {
RDBX_ERR_READER_FILE_GENERAL_ERROR = _RDB_ERR_EXTENSION_FIRST,
RDBX_ERR_RESP_FAILED_ALLOC,

/* reader errors */
RDBX_ERR_FAILED_FD_OPEN,

/* rdb2json errors */
RDBX_ERR_FAILED_OPEN_FILE,
RDBX_ERR_R2J_INVALID_STATE,
Expand Down
4 changes: 2 additions & 2 deletions src/ext/readerFileDesc.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ RdbxReaderFileDesc *RDBX_createReaderFileDesc(RdbParser *p, int fd, int fdCloseW
if (flags==-1) {

RDB_reportError(p, RDB_ERR_FAILED_GET_FD_FLAGS,
"RDBX_createReaderFileDesc(fd=%d): Error getting file descriptor flags", fd);
"RDBX_createReaderFileDesc(fd=%d): Failed to get fcntl(). Error:%s", fd, strerror(errno));
return NULL;
}

Expand All @@ -78,7 +78,7 @@ RdbxReaderFileDesc *RDBX_createReaderFileDesc(RdbParser *p, int fd, int fdCloseW
FILE *file = fdopen(fd, "r");

if (file == NULL) {
RDB_reportError(p, RDB_ERR_NONBLOCKING_FD,
RDB_reportError(p, RDBX_ERR_FAILED_FD_OPEN,
"RDBX_createReaderFileDesc(fd=%d): failed on fdopen()", fd);
return NULL;
}
Expand Down

0 comments on commit 30e8a96

Please sign in to comment.