Skip to content

Commit

Permalink
logging of report server connection attempts
Browse files Browse the repository at this point in the history
  • Loading branch information
n0mjs710 committed May 25, 2017
1 parent 10cec77 commit e3070c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dmrlink.py
Original file line number Diff line number Diff line change
Expand Up @@ -1025,10 +1025,11 @@ def __init__(self, config, logger):
self._logger = logger

def buildProtocol(self, addr):
print(self._config['REPORTS']['REPORT_CLIENTS'])
if (addr.host) in self._config['REPORTS']['REPORT_CLIENTS'] or '*' in self._config['REPORTS']['REPORT_CLIENTS']:
self._logger.debug('Permitting report server connection attempt from: %s:%s', addr.host, addr.port)
return report(self)
else:
self._logger.error('Invalid report server connection attempt from: %s:%s', addr.host, addr.port)
return None

def send_clients(self, _message):
Expand Down

0 comments on commit e3070c5

Please sign in to comment.