Commit dca60706 authored by Albert Vaca Cintora's avatar Albert Vaca Cintora

Remove legacy UDP port support

parent e9d16d83
......@@ -69,7 +69,6 @@ public class LanLinkProvider extends BaseLinkProvider implements LanLink.LinkDis
public static final int MIN_VERSION_WITH_SSL_SUPPORT = 6;
private static final int MIN_VERSION_WITH_NEW_PORT_SUPPORT = 7;
private final static int MIN_PORT_LEGACY = 1714;
private final static int MIN_PORT = 1716;
private final static int MAX_PORT = 1764;
final static int PAYLOAD_TRANSFER_MIN_PORT = 1739;
......@@ -80,7 +79,6 @@ public class LanLinkProvider extends BaseLinkProvider implements LanLink.LinkDis
private ServerSocket tcpServer;
private DatagramSocket udpServer;
private DatagramSocket udpServerOldPort;
private boolean listening = false;
......@@ -412,7 +410,6 @@ public class LanLinkProvider extends BaseLinkProvider implements LanLink.LinkDis
try {
InetAddress client = InetAddress.getByName(ipstr);
socket.send(new DatagramPacket(bytes, bytes.length, client, MIN_PORT));
socket.send(new DatagramPacket(bytes, bytes.length, client, MIN_PORT_LEGACY));
//Log.i("KDE/LanLinkProvider","Udp identity package sent to address "+client);
} catch (Exception e) {
e.printStackTrace();
......@@ -436,7 +433,6 @@ public class LanLinkProvider extends BaseLinkProvider implements LanLink.LinkDis
listening = true;
udpServer = setupUdpListener(MIN_PORT);
udpServerOldPort = setupUdpListener(MIN_PORT_LEGACY);
// Due to certificate request from SSL server to client, the certificate request message from device with latest android version to device with
// old android version causes a FATAL ALERT message stating that incorrect certificate request
......@@ -468,11 +464,6 @@ public class LanLinkProvider extends BaseLinkProvider implements LanLink.LinkDis
} catch (Exception e) {
e.printStackTrace();
}
try {
udpServerOldPort.close();
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment