QTfrontend/net/newnetclient.cpp
changeset 14838 bdb47255d7e4
parent 13969 4d761adb4e6c
child 14865 90cf07c60feb
--- a/QTfrontend/net/newnetclient.cpp	Thu Apr 25 21:25:16 2019 +0200
+++ b/QTfrontend/net/newnetclient.cpp	Thu Apr 25 23:59:50 2019 +0300
@@ -296,6 +296,26 @@
         return;
     }
 
+    if (lst[0] == "REDIRECT")
+    {        
+        if (lst.size() < 2 || lst[1].toInt() == 0)
+        {
+            qWarning("Net: Malformed REDIRECT message");
+            return;            
+        }
+
+        quint16 port = lst[1].toInt();
+        if (port == 0) 
+        {
+            qWarning() << "Invalid redirection port";            
+        }
+        else 
+        {
+            emit redirected(port);
+        }
+        return;
+    }
+
     if (lst[0] == "CONNECTED")
     {
         if(lst.size() < 3 || lst[2].toInt() < cMinServerVersion)