Cleanup errors
This commit is contained in:
parent
141fa3ecc4
commit
03e2dff984
|
@ -103,6 +103,7 @@ def build_acl():
|
||||||
|
|
||||||
# Depending on which type of ACL is used (PERMIT, DENY... or there isn't one)
|
# Depending on which type of ACL is used (PERMIT, DENY... or there isn't one)
|
||||||
# define a differnet function to be used to check the ACL
|
# define a differnet function to be used to check the ACL
|
||||||
|
global allow_sub
|
||||||
if ACL_ACTION == 'PERMIT':
|
if ACL_ACTION == 'PERMIT':
|
||||||
def allow_sub(_sub):
|
def allow_sub(_sub):
|
||||||
if _sub in ACL:
|
if _sub in ACL:
|
||||||
|
@ -387,7 +388,7 @@ if __name__ == '__main__':
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import signal
|
import signal
|
||||||
from dmrutils import try_download, mk_id_dict
|
from dmr_utils import try_download, mk_id_dict
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -181,7 +181,7 @@ class HBSYSTEM(DatagramProtocol):
|
||||||
def master_dereg(self):
|
def master_dereg(self):
|
||||||
for _client in self._clients:
|
for _client in self._clients:
|
||||||
self.send_client(_client, 'MSTCL'+_client)
|
self.send_client(_client, 'MSTCL'+_client)
|
||||||
self._logger.info('(%s) De-Registration sent to Client: %s (%s)', self._system, self._clients[_client]['CALLSIGN'], self._clients[_client][client]['RADIO_ID'])
|
self._logger.info('(%s) De-Registration sent to Client: %s (%s)', self._system, self._clients[_client]['CALLSIGN'], self._clients[_client]['RADIO_ID'])
|
||||||
|
|
||||||
def client_dereg(self):
|
def client_dereg(self):
|
||||||
self.send_master('RPTCL'+self._config['RADIO_ID'])
|
self.send_master('RPTCL'+self._config['RADIO_ID'])
|
||||||
|
@ -271,7 +271,7 @@ class HBSYSTEM(DatagramProtocol):
|
||||||
_this_client['LAST_PING'] = time()
|
_this_client['LAST_PING'] = time()
|
||||||
_sent_hash = _data[8:]
|
_sent_hash = _data[8:]
|
||||||
_salt_str = hex_str_4(_this_client['SALT'])
|
_salt_str = hex_str_4(_this_client['SALT'])
|
||||||
_calc_hash = a(sha256(_salt_str+self._config['PASSPHRASE']).hexdigest())
|
_calc_hash = bhex(sha256(_salt_str+self._config['PASSPHRASE']).hexdigest())
|
||||||
if _sent_hash == _calc_hash:
|
if _sent_hash == _calc_hash:
|
||||||
_this_client['CONNECTION'] = 'WAITING_CONFIG'
|
_this_client['CONNECTION'] = 'WAITING_CONFIG'
|
||||||
self.send_client(_radio_id, 'RPTACK'+_radio_id)
|
self.send_client(_radio_id, 'RPTACK'+_radio_id)
|
||||||
|
|
Loading…
Reference in New Issue