GUACAMOLE-414: Convert errors to strings from ptread_mutex_lock and unlock.
This commit is contained in:
parent
36817f3774
commit
bfc6c1e6e0
@ -77,7 +77,8 @@ static rfbBool guac_vnc_lock_write_to_tls(rfbClient* rfb_client) {
|
|||||||
/* Lock write access */
|
/* Lock write access */
|
||||||
int retval = pthread_mutex_lock(&(vnc_client->tls_lock));
|
int retval = pthread_mutex_lock(&(vnc_client->tls_lock));
|
||||||
if (retval) {
|
if (retval) {
|
||||||
guac_client_log(gc, GUAC_LOG_ERROR, "Error locking TLS write mutex: %d", retval);
|
guac_client_log(gc, GUAC_LOG_ERROR, "Error locking TLS write mutex: %s",
|
||||||
|
strerror(retval));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -106,7 +107,8 @@ static rfbBool guac_vnc_unlock_write_to_tls(rfbClient* rfb_client) {
|
|||||||
/* Unlock write access */
|
/* Unlock write access */
|
||||||
int retval = pthread_mutex_unlock(&(vnc_client->tls_lock));
|
int retval = pthread_mutex_unlock(&(vnc_client->tls_lock));
|
||||||
if (retval) {
|
if (retval) {
|
||||||
guac_client_log(gc, GUAC_LOG_ERROR, "Error unlocking TLS write mutex: %d", retval);
|
guac_client_log(gc, GUAC_LOG_ERROR, "Error unlocking TLS write mutex: %d",
|
||||||
|
strerror(retval));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user