Added suport for statics and default reflector to sql routines
This commit is contained in:
parent
769aef3e6f
commit
785f86b93b
@ -55,27 +55,32 @@ class useMYSQL:
|
||||
logger.info('(MYSQL) error, problem with cursor execute')
|
||||
raise Exception('Problem with cursor execute')
|
||||
|
||||
for (callsign, mode, enabled, _repeat, max_peers, export_ambe, ip, port, passphrase, group_hangtime, use_acl, reg_acl, sub_acl, tgid_ts1_acl, tgid_ts2_acl, default_ua_timer, single_mode, voice_ident) in _cursor:
|
||||
|
||||
CONFIG['SYSTEMS'].update({callsign: {
|
||||
'MODE': mode,
|
||||
'ENABLED': bool(enabled),
|
||||
'REPEAT': bool(_repeat),
|
||||
'MAX_PEERS': int(max_peers),
|
||||
'IP': ip,
|
||||
'PORT': int(port),
|
||||
'PASSPHRASE': passphrase,
|
||||
'GROUP_HANGTIME': int(group_hangtime),
|
||||
'USE_ACL': bool(use_acl),
|
||||
'REG_ACL': reg_acl,
|
||||
'SUB_ACL': sub_acl,
|
||||
'TG1_ACL': tgid_ts1_acl,
|
||||
'TG2_ACL': tgid_ts2_acl,
|
||||
'DEFAULT_UA_TIMER': int(default_ua_timer),
|
||||
'SINGLE_MODE': bool(single_mode),
|
||||
'VOICE_IDENT': bool(voice_ident)
|
||||
}})
|
||||
CONFIG['SYSTEMS'][callsign].update({'PEERS': {}})
|
||||
for (callsign, mode, enabled, _repeat, max_peers, export_ambe, ip, port, passphrase, group_hangtime, use_acl, reg_acl, sub_acl, tgid_ts1_acl, tgid_ts2_acl, default_ua_timer, single_mode, voice_ident,ts1_static,ts2_static,default_reflector) in _cursor:
|
||||
try:
|
||||
CONFIG['SYSTEMS'].update({callsign: {
|
||||
'MODE': mode,
|
||||
'ENABLED': bool(enabled),
|
||||
'REPEAT': bool(_repeat),
|
||||
'MAX_PEERS': int(max_peers),
|
||||
'IP': ip,
|
||||
'PORT': int(port),
|
||||
'PASSPHRASE': passphrase,
|
||||
'GROUP_HANGTIME': int(group_hangtime),
|
||||
'USE_ACL': bool(use_acl),
|
||||
'REG_ACL': reg_acl,
|
||||
'SUB_ACL': sub_acl,
|
||||
'TG1_ACL': tgid_ts1_acl,
|
||||
'TG2_ACL': tgid_ts2_acl,
|
||||
'DEFAULT_UA_TIMER': int(default_ua_timer),
|
||||
'SINGLE_MODE': bool(single_mode),
|
||||
'VOICE_IDENT': bool(voice_ident),
|
||||
'TS1_STATIC': ts1_static,
|
||||
'TS2_STATIC': ts2_static,
|
||||
'DEFAULT_REFLECTOR': int(default_reflector)
|
||||
}})
|
||||
CONFIG['SYSTEMS'][callsign].update({'PEERS': {}})
|
||||
except TypeError:
|
||||
logger.info('(MYSQL) Problem with data from MySQL - TypeError, carrying on to next row')
|
||||
|
||||
return(CONFIG['SYSTEMS'])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user