From ff4da40412d96bf8b3038f6d978b7157b57ad76b Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Tue, 28 Aug 2012 10:46:43 +0200 Subject: [PATCH] Use comma instead of | to avoid java split problems. Ensure that the sent string is a byte string. --- src/calibre/devices/smart_device_app/driver.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calibre/devices/smart_device_app/driver.py b/src/calibre/devices/smart_device_app/driver.py index b321182916..6f76217b2b 100644 --- a/src/calibre/devices/smart_device_app/driver.py +++ b/src/calibre/devices/smart_device_app/driver.py @@ -585,8 +585,9 @@ class SMART_DEVICE_APP(DeviceConfig, DevicePlugin): try: packet = self.broadcast_socket.recvfrom(100) remote = packet[1] - message = str(socket.gethostname().partition('.')[0] - + '|') + str(self.port) + message = str(b'calibre smart device client on ' + + str(socket.gethostname().partition('.')[0]) + + b',' + str(self.port)) self._debug('received broadcast', packet, message) self.broadcast_socket.sendto(message, remote) except: