Simon 2 years ago
parent e4f43da5b5
commit 448c853760

@ -799,7 +799,10 @@ def bridge_reset():
if '_reset' in CONFIG['SYSTEMS'][_system] and CONFIG['SYSTEMS'][_system]['_reset']: if '_reset' in CONFIG['SYSTEMS'][_system] and CONFIG['SYSTEMS'][_system]['_reset']:
logger.info('(BRIDGERESET) Bridge reset for %s - no peers',_system) logger.info('(BRIDGERESET) Bridge reset for %s - no peers',_system)
remove_bridge_system(_system) remove_bridge_system(_system)
del(CONFIG['SYSTEMS'][_system]['_opt_key']) try:
del(CONFIG['SYSTEMS'][_system]['_opt_key'])
except:
pass
CONFIG['SYSTEMS'][_system]['_reset'] = False CONFIG['SYSTEMS'][_system]['_reset'] = False
CONFIG['SYSTEMS'][_system]['_resetlog'] = False CONFIG['SYSTEMS'][_system]['_resetlog'] = False
@ -830,16 +833,16 @@ def options_config():
if '_opt_key' in CONFIG['SYSTEMS'][_system]: if '_opt_key' in CONFIG['SYSTEMS'][_system]:
if 'KEY' not in _options: if 'KEY' not in _options:
logger.info('(OPTIONS) %s, options key set but no key in options string, skipping',_system) logger.debug('(OPTIONS) %s, options key set but no key in options string, skipping',_system)
continue continue
elif CONFIG['SYSTEMS'][_system]['_opt_key'] != _options['KEY']: elif CONFIG['SYSTEMS'][_system]['_opt_key'] != _options['KEY']:
logger.info('(OPTIONS) %s, options key set but key sent does not match, skipping',_system) logger.debug('(OPTIONS) %s, options key set but key sent does not match, skipping',_system)
continue continue
elif 'KEY' in _options and _options['KEY']: elif 'KEY' in _options and _options['KEY']:
logger.info('(OPTIONS) %s, _opt_key not set but key sent. Setting to sent key',_system) logger.debug('(OPTIONS) %s, _opt_key not set but key sent. Setting to sent key',_system)
CONFIG['SYSTEMS'][_system]['_opt_key'] = _options['KEY'] CONFIG['SYSTEMS'][_system]['_opt_key'] = _options['KEY']
else: else:
logger.info('(OPTIONS) %s, _opt_key not set and no key sent. Generate random key',_system) logger.debug('(OPTIONS) %s, _opt_key not set and no key sent. Generate random key',_system)
CONFIG['SYSTEMS'][_system]['_opt_key'] = randint(0,65535) CONFIG['SYSTEMS'][_system]['_opt_key'] = randint(0,65535)

Loading…
Cancel
Save

Powered by TurnKey Linux.