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


##########
src/libguac/socket.c:
##########
@@ -286,56 +308,70 @@ ssize_t __guac_socket_write_base64_triplet(guac_socket* 
socket,
         output[3] = '=';
     }
 
-    /* At this point, 4 base64 bytes have been written */
-    if (guac_socket_write(socket, output, 4))
-        return -1;
-
-    /* If no second byte was provided, only one byte was written */
-    if (b < 0)
-        return 1;
-
-    /* If no third byte was provided, only two bytes were written */
-    if (c < 0)
-        return 2;
+    return 0;
+}
 
-    /* Otherwise, three bytes were written */
-    return 3;
+ssize_t guac_socket_flush_base64(guac_socket* socket) {
+    const unsigned char* src = socket->__ready_buf;
 
-}
+    int encodedCount = 0;
+    int remaining = socket->__ready;
 
-ssize_t __guac_socket_write_base64_byte(guac_socket* socket, int buf) {
+    // Encode bytes in groups of three

Review Comment:
   Sorry - didn't notice this before, but please use:
   
   ```c
   /* C-style comments */
   ```
   
   instead of:
   
   ```
   // C++-style comments
   ```
   
   Same elsewhere in these changes.



-- 
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