Make network insensitive to absence of onionhostname config option
This commit is contained in:
parent
8e05e4a178
commit
8fc42b758d
|
@ -241,8 +241,6 @@ def updateConfig():
|
||||||
* defaults.networkDefaultPayloadLengthExtraBytes)
|
* defaults.networkDefaultPayloadLengthExtraBytes)
|
||||||
)
|
)
|
||||||
|
|
||||||
if not config.has_option('bitmessagesettings', 'onionhostname'):
|
|
||||||
config.set('bitmessagesettings', 'onionhostname', '')
|
|
||||||
if not config.has_option('bitmessagesettings', 'onionport'):
|
if not config.has_option('bitmessagesettings', 'onionport'):
|
||||||
config.set('bitmessagesettings', 'onionport', '8444')
|
config.set('bitmessagesettings', 'onionport', '8444')
|
||||||
if not config.has_option('bitmessagesettings', 'onionbindip'):
|
if not config.has_option('bitmessagesettings', 'onionbindip'):
|
||||||
|
|
|
@ -164,7 +164,7 @@ class BMConnectionPool(object):
|
||||||
def getListeningIP():
|
def getListeningIP():
|
||||||
"""What IP are we supposed to be listening on?"""
|
"""What IP are we supposed to be listening on?"""
|
||||||
if config.safeGet(
|
if config.safeGet(
|
||||||
"bitmessagesettings", "onionhostname").endswith(".onion"):
|
"bitmessagesettings", "onionhostname", "").endswith(".onion"):
|
||||||
host = config.safeGet(
|
host = config.safeGet(
|
||||||
"bitmessagesettings", "onionbindip")
|
"bitmessagesettings", "onionbindip")
|
||||||
else:
|
else:
|
||||||
|
|
Reference in New Issue
Block a user