mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-30 21:55:10 +00:00
Broadcast actual tcp server port used
Summary: UDP Identity packet should set tcpPort to the actual tcpServer port used Reviewers: #kde_connect, albertvaka Reviewed By: #kde_connect, albertvaka Subscribers: albertvaka, nicolasfella, sredman, kdeconnect Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D16351
This commit is contained in:
committed by
Albert Vaca
parent
51c0a713bc
commit
2c32bd334a
@@ -393,7 +393,8 @@ public class LanLinkProvider extends BaseLinkProvider implements LanLink.LinkDis
|
||||
iplist.add("255.255.255.255"); //Default: broadcast.
|
||||
|
||||
NetworkPacket identity = NetworkPacket.createIdentityPacket(context);
|
||||
identity.set("tcpPort", MIN_PORT);
|
||||
int port = (tcpServer == null || !tcpServer.isBound()) ? MIN_PORT : tcpServer.getLocalPort();
|
||||
identity.set("tcpPort", port);
|
||||
DatagramSocket socket = null;
|
||||
byte[] bytes = null;
|
||||
try {
|
||||
|
Reference in New Issue
Block a user