summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorAndrzej J.R. Hunt <andrzej@ahunt.org>2012-08-02 16:52:53 +0200
committerMichael Meeks <michael.meeks@suse.com>2012-08-06 10:23:09 +0100
commit5e365b05683402dcdcf527e74e472e844cff15a0 (patch)
treeb8b014f8041c3163fb24dc6a30853201ffb86f3d /android
parent473143eac756184028e487d23a9af6ea452e1324 (diff)
Server discovery functional.
Change-Id: I8642e0ea95a8d6691b76cc4d2dc1ddfbbf2b03e2
Diffstat (limited to 'android')
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/communication/ServerFinder.java21
1 files changed, 11 insertions, 10 deletions
diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/ServerFinder.java b/android/sdremote/src/org/libreoffice/impressremote/communication/ServerFinder.java
index d787e3478f1c..b78a9a43feb0 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/communication/ServerFinder.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/communication/ServerFinder.java
@@ -40,16 +40,17 @@ public class ServerFinder {
if (i == aBuffer.length || !aCommand.equals("LOREMOTE_ADVERTISE")) {
return;
}
-
- for (int j = i + 1; j < aBuffer.length; j++) {
- if (aPacket.getData()[j] == '\n') {
- aAddress = new String(aPacket.getData(), i + 1, j, CHARSET);
- }
- }
-
- if (aAddress != null) {
- System.out.println("Address is :" + aAddress + "\n");
- }
+ System.out.println("SF: " + aPacket.getAddress().toString());
+
+ // for (int j = i + 1; j < aBuffer.length; j++) {
+ // if (aPacket.getData()[j] == '\n') {
+ // aAddress = new String(aPacket.getData(), i + 1, j, CHARSET);
+ // }
+ // }
+ //
+ // if (aAddress != null) {
+ // System.out.println("Address is :" + aAddress + "\n");
+ // }
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();