GUAC-779: Terminal channel mutex must exist before terminal channel.
This commit is contained in:
parent
be9c56f9a3
commit
2fa1468386
@ -409,6 +409,8 @@ void* ssh_client_thread(void* data) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pthread_mutex_init(&client_data->term_channel_lock, NULL);
|
||||||
|
|
||||||
/* Open channel for terminal */
|
/* Open channel for terminal */
|
||||||
client_data->term_channel = libssh2_channel_open_session(client_data->session);
|
client_data->term_channel = libssh2_channel_open_session(client_data->session);
|
||||||
if (client_data->term_channel == NULL) {
|
if (client_data->term_channel == NULL) {
|
||||||
@ -477,8 +479,6 @@ void* ssh_client_thread(void* data) {
|
|||||||
/* Logged in */
|
/* Logged in */
|
||||||
guac_client_log_info(client, "SSH connection successful.");
|
guac_client_log_info(client, "SSH connection successful.");
|
||||||
|
|
||||||
pthread_mutex_init(&client_data->term_channel_lock, NULL);
|
|
||||||
|
|
||||||
/* Start input thread */
|
/* Start input thread */
|
||||||
if (pthread_create(&(input_thread), NULL, ssh_input_thread, (void*) client)) {
|
if (pthread_create(&(input_thread), NULL, ssh_input_thread, (void*) client)) {
|
||||||
guac_client_abort(client, GUAC_PROTOCOL_STATUS_SERVER_ERROR, "Unable to start input thread");
|
guac_client_abort(client, GUAC_PROTOCOL_STATUS_SERVER_ERROR, "Unable to start input thread");
|
||||||
|
Loading…
Reference in New Issue
Block a user