Use comma instead of | to avoid java split problems. Ensure that the sent string is a byte string.

This commit is contained in:
Charles Haley 2012-08-28 10:46:43 +02:00
parent 15749dc4d7
commit ff4da40412

View File

@ -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: