Changeset View
Changeset View
Standalone View
Standalone View
src/org/kde/kdeconnect/Backends/LanBackend/LanLinkProvider.java
Context not available. | |||||
99 | 99 | | |||
---|---|---|---|---|---|
100 | //They received my UDP broadcast and are connecting to me. The first thing they sned should be their identity. | 100 | //They received my UDP broadcast and are connecting to me. The first thing they sned should be their identity. | ||
101 | void tcpPacketReceived(Socket socket) throws Exception { | 101 | void tcpPacketReceived(Socket socket) throws Exception { | ||
102 | 102 | Log.i("KDE/LanLinkProvider", "TCP Packet received."); | |||
103 | NetworkPacket networkPacket; | 103 | NetworkPacket networkPacket; | ||
104 | try { | 104 | try { | ||
105 | BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream())); | 105 | BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream())); | ||
Context not available. | |||||
208 | Log.e("KDE/LanLinkProvider", "Somehow I'm connected to myself, ignoring. This should not happen."); | 208 | Log.e("KDE/LanLinkProvider", "Somehow I'm connected to myself, ignoring. This should not happen."); | ||
209 | return; | 209 | return; | ||
210 | } | 210 | } | ||
211 | 211 | Log.i("KDE/LanLinkProvider", "INIT SSL " + identityPacket.getString("deviceName")); | |||
212 | // If I'm the TCP server I will be the SSL client and viceversa. | 212 | // If I'm the TCP server I will be the SSL client and viceversa. | ||
213 | final boolean clientMode = (connectionStarted == LanLink.ConnectionStarted.Locally); | 213 | final boolean clientMode = (connectionStarted == LanLink.ConnectionStarted.Locally); | ||
214 | 214 | | |||
Context not available. | |||||
296 | //Update old link | 296 | //Update old link | ||
297 | Log.i("KDE/LanLinkProvider", "Reusing same link for device " + deviceId); | 297 | Log.i("KDE/LanLinkProvider", "Reusing same link for device " + deviceId); | ||
298 | final Socket oldSocket = currentLink.reset(socket, connectionOrigin); | 298 | final Socket oldSocket = currentLink.reset(socket, connectionOrigin); | ||
299 | //Log.e("KDE/LanLinkProvider", "Replacing socket. old: "+ oldSocket.hashCode() + " - new: "+ socket.hashCode()); | 299 | Log.i("KDE/LanLinkProvider", "Replacing socket. old: "+ oldSocket.hashCode() + " - new: "+ socket.hashCode()); | ||
300 | } else { | 300 | } else { | ||
301 | Log.i("KDE/LanLinkProvider", "Creating a new link for device " + deviceId); | 301 | Log.i("KDE/LanLinkProvider", "Creating a new link for device " + deviceId); | ||
302 | //Let's create the link | 302 | //Let's create the link | ||
Context not available. |