jmuehlner commented on code in PR #496:
URL: https://github.com/apache/guacamole-server/pull/496#discussion_r1522242112


##########
src/protocols/rdp/rdp.c:
##########
@@ -525,12 +525,24 @@ static int guac_rdp_handle_connection(guac_client* 
client) {
     /* Set default pointer */
     guac_common_cursor_set_pointer(rdp_client->display->cursor);
 
+    /* 
+     * Downgrade the lock to allow for concurrent read access
+     * Access to read locks need to be made available for other processes to 
use 
+     * while we await credentials from the user.
+     */
+    pthread_rwlock_unlock(&(rdp_client->lock));

Review Comment:
   Cool, looks good. I realize now that this doesn't _really_ require 
reentrancy (acquiring the write lock while holding the read lock, as you're 
doing now is equivalent to just releasing the read lock and acquiring the write 
lock).
   
   But it certainly won't hurt to use the reentrant locks either.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to