[chronojump] Fixed machineID that can send to long data on ping



commit a40e8aa5edd2649027c6f9920dc358cddc85f804
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon Apr 26 13:40:12 2021 +0200

    Fixed machineID that can send to long data on ping

 src/json/json.cs | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/src/json/json.cs b/src/json/json.cs
index f4bcd57c..70eda35a 100644
--- a/src/json/json.cs
+++ b/src/json/json.cs
@@ -392,6 +392,15 @@ public class Json
 
                json.Add("cj_version", cjVersion);
 
+               /*
+                  machine_id is an int (15) unsigned, but seems the 15 is not working, what is used is:
+                  maximum value is: 4294967295
+                  https://www.mysqltutorial.org/mysql-int/
+                  */
+               LogB.Information("machineID: " + machineID);
+               if(machineID.Length >= 10)
+                       machineID = "4294967295";
+
                json.Add("machine_id", machineID);
 
                // Converts it to a String


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