[chronojump] Fixed ping on windows (osVersion was too long)



commit 59c87879d3fab71a1fd0bce122db2c89a71fde21
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Jul 15 13:07:54 2020 +0200

    Fixed ping on windows (osVersion was too long)

 src/json/json.cs | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/src/json/json.cs b/src/json/json.cs
index 5adc31d9..808df87e 100644
--- a/src/json/json.cs
+++ b/src/json/json.cs
@@ -213,10 +213,17 @@ public class Json
 
                // Creates the json object
                JsonObject json = new JsonObject();
+
+               if(osVersion.Length > 15)
+                       osVersion = osVersion.Substring(0,15); //at server mysql max length of this param is 
15 (windows returns a longer string)
+
                json.Add("os_version", osVersion);
+
                if(cjVersion.Length > 11)
                        cjVersion = cjVersion.Substring(0,11); //send only the first 11 chars, but not if 
version is just 2.0.0, see: buildInfo.cs
+
                json.Add("cj_version", cjVersion);
+
                json.Add("machine_id", machineID);
 
                // Converts it to a String


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]