Outline of language file support

Move sql.close() into SQL thread
This commit is contained in:
Simon 2021-01-27 19:49:02 +00:00
parent 91fe2e6f9d
commit 67db3f1acd
3 changed files with 6 additions and 7 deletions

View File

@ -46,6 +46,9 @@ SUB_ACL: DENY:1
TGID_TS1_ACL: PERMIT:ALL
TGID_TS2_ACL: PERMIT:ALL
GEN_STAT_BRIDGES: False
ALLOW_NULL_PASSPHRASE: False
ANNOUNCEMENT_LANGUAGE: en_GB
# NOT YET WORKING: NETWORK REPORTING CONFIGURATION

View File

@ -42,11 +42,6 @@ import re
from twisted.internet.protocol import Factory, Protocol
from twisted.protocols.basic import NetstringReceiver
from twisted.internet import reactor, task
#We're going to *try* and be thread safe
#from twisted.python import threadable
#threadable.init(1)
from threading import Semaphore
# Things we import from the main hblink module
from hblink import HBSYSTEM, OPENBRIDGE, systems, hblink_handler, reportFactory, REPORT_OPCODES, mk_aliases
@ -666,6 +661,7 @@ def mysqlGetConfig():
logger.debug('(MYSQL) problem connecting to SQL server, aborting')
return
sql.close()
reactor.callFromThread(mysql_config_check,SQLGETCONFIG)
@ -926,7 +922,6 @@ def mysql_config_check(SQLGETCONFIG):
#CONFIG['SYSTEMS'].update(SQLCONFIG)
SQLCONFIG = {}
sql.close()
class routerOBP(OPENBRIDGE):

View File

@ -123,7 +123,8 @@ def build_config(_config_file):
'TG1_ACL': config.get(section, 'TGID_TS1_ACL'),
'TG2_ACL': config.get(section, 'TGID_TS2_ACL'),
'GEN_STAT_BRIDGES': config.getboolean(section, 'GEN_STAT_BRIDGES'),
'ALLOW_NULL_PASSPHRASE': config.getboolean(section, 'ALLOW_NULL_PASSPHRASE')
'ALLOW_NULL_PASSPHRASE': config.getboolean(section, 'ALLOW_NULL_PASSPHRASE'),
'ANNOUNCEMENT_LANGUAGE': config.get(section, 'ANNOUNCEMENT_LANGUAGE')
})