necouchman commented on a change in pull request #228:
URL: https://github.com/apache/guacamole-server/pull/228#discussion_r489835140



##########
File path: src/libguac/protocol.c
##########
@@ -1241,3 +1302,34 @@ int guac_protocol_decode_base64(char* base64) {
 
 }
 
+guac_protocol_version guac_protocol_string_to_version(char* version_string) {
+    
+    guac_protocol_version_mapping* current = guac_protocol_version_table;
+    while (current->version != GUAC_PROTOCOL_VERSION_UNKNOWN) {
+        
+        if (strcmp(current->version_string, version_string) == 0)
+            return current->version;
+        
+        current++;
+        
+    }
+    
+    return GUAC_PROTOCOL_VERSION_UNKNOWN;
+    
+}
+
+const char* guac_protocol_version_to_string(guac_protocol_version version) {
+    
+    guac_protocol_version_mapping* current = guac_protocol_version_table;
+    while (current->version) {

Review comment:
       I believe I'm doing this correctly, now.




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

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


Reply via email to