You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by GitBox <gi...@apache.org> on 2021/09/10 12:45:10 UTC

[GitHub] [guacamole-server] ycaibb opened a new pull request #346: GUACAMOLE-1416: Fix unreleased the lock in the ssh_client_thread

ycaibb opened a new pull request #346:
URL: https://github.com/apache/guacamole-server/pull/346


   GUACAMOLE-1416: Fix unreleased the lock ssh_client->term_channel_lock in the ssh_client_thread.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [guacamole-server] ycaibb commented on a change in pull request #346: GUACAMOLE-1416: Fix unreleased the lock in the ssh_client_thread

Posted by GitBox <gi...@apache.org>.
ycaibb commented on a change in pull request #346:
URL: https://github.com/apache/guacamole-server/pull/346#discussion_r706227873



##########
File path: src/protocols/ssh/ssh.c
##########
@@ -438,8 +438,10 @@ void* ssh_client_thread(void* data) {
         /* Send keepalive at configured interval */
         if (settings->server_alive_interval > 0) {
             timeout = 0;
-            if (libssh2_keepalive_send(ssh_client->session->session, &timeout) > 0)
+            if (libssh2_keepalive_send(ssh_client->session->session, &timeout) > 0) {
+                pthread_mutex_unlock(&(ssh_client->term_channel_lock));
                 break;
+	    }

Review comment:
       Please check. Sorry for the inconvenience : )




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [guacamole-server] necouchman commented on a change in pull request #346: GUACAMOLE-1416: Fix unreleased the lock in the ssh_client_thread

Posted by GitBox <gi...@apache.org>.
necouchman commented on a change in pull request #346:
URL: https://github.com/apache/guacamole-server/pull/346#discussion_r706167597



##########
File path: src/protocols/ssh/ssh.c
##########
@@ -439,6 +439,7 @@ void* ssh_client_thread(void* data) {
         if (settings->server_alive_interval > 0) {
             timeout = 0;
             if (libssh2_keepalive_send(ssh_client->session->session, &timeout) > 0)
+                pthread_mutex_unlock(&(ssh_client->term_channel_lock));
                 break;

Review comment:
       You'll need to add the braces `{..}` for this `if` statement. By just adding this line the code will then always execute the `break` if the `settings->server_alive_interval` is greater than `0`, which is probably not what we want.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [guacamole-server] necouchman merged pull request #346: GUACAMOLE-1416: Fix unreleased the lock in the ssh_client_thread

Posted by GitBox <gi...@apache.org>.
necouchman merged pull request #346:
URL: https://github.com/apache/guacamole-server/pull/346


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [guacamole-server] ycaibb commented on a change in pull request #346: GUACAMOLE-1416: Fix unreleased the lock in the ssh_client_thread

Posted by GitBox <gi...@apache.org>.
ycaibb commented on a change in pull request #346:
URL: https://github.com/apache/guacamole-server/pull/346#discussion_r706202075



##########
File path: src/protocols/ssh/ssh.c
##########
@@ -439,6 +439,7 @@ void* ssh_client_thread(void* data) {
         if (settings->server_alive_interval > 0) {
             timeout = 0;
             if (libssh2_keepalive_send(ssh_client->session->session, &timeout) > 0)
+                pthread_mutex_unlock(&(ssh_client->term_channel_lock));
                 break;

Review comment:
       Thanks, please check the new one




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [guacamole-server] necouchman commented on a change in pull request #346: GUACAMOLE-1416: Fix unreleased the lock in the ssh_client_thread

Posted by GitBox <gi...@apache.org>.
necouchman commented on a change in pull request #346:
URL: https://github.com/apache/guacamole-server/pull/346#discussion_r706208344



##########
File path: src/protocols/ssh/ssh.c
##########
@@ -438,8 +438,10 @@ void* ssh_client_thread(void* data) {
         /* Send keepalive at configured interval */
         if (settings->server_alive_interval > 0) {
             timeout = 0;
-            if (libssh2_keepalive_send(ssh_client->session->session, &timeout) > 0)
+            if (libssh2_keepalive_send(ssh_client->session->session, &timeout) > 0) {
+                pthread_mutex_unlock(&(ssh_client->term_channel_lock));
                 break;
+	    }

Review comment:
       This is almost lined up, but not quite. Sorry for the #nitpick, but we'd like the style consistent :-).




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org