mike-jumper commented on code in PR #525:
URL: https://github.com/apache/guacamole-server/pull/525#discussion_r1779340206


##########
src/libguac/client.c:
##########
@@ -132,7 +132,8 @@ guac_stream* guac_client_alloc_stream(guac_client* client) {
         return NULL;
 
     /* Allocate stream */
-    stream_index = guac_pool_next_int(client->__stream_pool);
+    stream_index = guac_pool_next_int_below_or_die(client->__stream_pool,

Review Comment:
   > Right above this we do a non-threadsafe check against 
GUAC_CLIENT_MAX_STREAMS, which will cause the function to return NULL - do we 
still need that? Does the new check not correctly handle this?
   
   Yes - very good catch. I'll remove the superfluous check.
   
   > And if the documented behavior of this function is to return NULL when out 
of streams, why are we dying here instead?
   
   Also fair - will fix.



-- 
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-unsubscr...@guacamole.apache.org

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

Reply via email to