Properly check errno if guac_error is GUAC_STATUS_SEE_ERRNO
This commit is contained in:
parent
857c2e03c9
commit
c6d1916afa
@ -36,6 +36,8 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef HAVE_LIBPTHREAD
|
||||
#include <pthread.h>
|
||||
@ -49,7 +51,6 @@ const char* __GUAC_STATUS_SUCCESS_STR = "Success";
|
||||
const char* __GUAC_STATUS_NO_MEMORY_STR = "Insufficient memory";
|
||||
const char* __GUAC_STATUS_NO_INPUT_STR = "End of input stream";
|
||||
const char* __GUAC_STATUS_INPUT_TIMEOUT_STR = "Read timeout";
|
||||
const char* __GUAC_STATUS_SEE_ERRNO_STR = "(see value of errno)";
|
||||
const char* __GUAC_STATUS_OUTPUT_ERROR_STR = "Output error";
|
||||
const char* __GUAC_STATUS_BAD_ARGUMENT_STR = "Invalid argument";
|
||||
const char* __GUAC_STATUS_BAD_STATE_STR = "Illegal state";
|
||||
@ -78,7 +79,7 @@ const char* guac_status_string(guac_status status) {
|
||||
|
||||
/* Further information in errno */
|
||||
case GUAC_STATUS_SEE_ERRNO:
|
||||
return __GUAC_STATUS_SEE_ERRNO_STR;
|
||||
return strerror(errno);
|
||||
|
||||
/* Output error */
|
||||
case GUAC_STATUS_OUTPUT_ERROR:
|
||||
|
Loading…
Reference in New Issue
Block a user