mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Fix bug 1889255: wireless TCP port upper limit is 32000 only
This commit is contained in:
parent
12c14b491f
commit
c686bf212d
@ -1931,7 +1931,7 @@ class SMART_DEVICE_APP(DeviceConfig, DevicePlugin):
|
|||||||
while i < 100: # try 9090 then up to 99 random port numbers
|
while i < 100: # try 9090 then up to 99 random port numbers
|
||||||
i += 1
|
i += 1
|
||||||
port = self._attach_to_port(self.listen_socket,
|
port = self._attach_to_port(self.listen_socket,
|
||||||
9090 if i == 1 else random.randint(8192, 32000))
|
9090 if i == 1 else random.randint(8192, 65525))
|
||||||
if port != 0:
|
if port != 0:
|
||||||
break
|
break
|
||||||
if port == 0:
|
if port == 0:
|
||||||
|
@ -57,7 +57,7 @@ class SmartdeviceDialog(QDialog, Ui_Dialog):
|
|||||||
self.fixed_port.setToolTip('<p>' +
|
self.fixed_port.setToolTip('<p>' +
|
||||||
_('Try 9090. If calibre says that it fails to connect '
|
_('Try 9090. If calibre says that it fails to connect '
|
||||||
'to the port, try another number. You can use any number between '
|
'to the port, try another number. You can use any number between '
|
||||||
'8,000 and 32,000.') + '</p>')
|
'8,000 and 65,535.') + '</p>')
|
||||||
|
|
||||||
self.ip_addresses.setToolTip('<p>' +
|
self.ip_addresses.setToolTip('<p>' +
|
||||||
_('These are the IP addresses for this computer. If you decide to have your device connect to '
|
_('These are the IP addresses for this computer. If you decide to have your device connect to '
|
||||||
@ -116,12 +116,12 @@ class SmartdeviceDialog(QDialog, Ui_Dialog):
|
|||||||
port = int(port)
|
port = int(port)
|
||||||
except:
|
except:
|
||||||
error_dialog(self, _('Invalid port number'),
|
error_dialog(self, _('Invalid port number'),
|
||||||
_('The port must be a number between 8000 and 32000.'), show=True)
|
_('The port must be a number between 8000 and 65535.'), show=True)
|
||||||
return
|
return
|
||||||
|
|
||||||
if port < 8000 or port > 32000:
|
if port < 8000 or port > 65535:
|
||||||
error_dialog(self, _('Invalid port number'),
|
error_dialog(self, _('Invalid port number'),
|
||||||
_('The port must be a number between 8000 and 32000.'), show=True)
|
_('The port must be a number between 8000 and 65535.'), show=True)
|
||||||
return
|
return
|
||||||
|
|
||||||
self.device_manager.set_option('smartdevice', 'password',
|
self.device_manager.set_option('smartdevice', 'password',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user