diff options
author | Ivan Alejandro <ivanalejandro0@gmail.com> | 2013-09-06 15:13:49 -0300 |
---|---|---|
committer | Ivan Alejandro <ivanalejandro0@gmail.com> | 2013-09-06 15:13:49 -0300 |
commit | 9cb7c71dcb3cf0650b1b29b9422407e3419ffade (patch) | |
tree | 502b2f7636736633b8e3dad901bb137922ec415b /src/leap/common/events/server.py | |
parent | 3a21155bf3fb4990ce5a731680c8729a86cbbe3b (diff) | |
parent | 23b96758a217f5a7b6f1ea7c99294c68b53fae65 (diff) |
Merge branch 'release-0.3.2'
Diffstat (limited to 'src/leap/common/events/server.py')
-rw-r--r-- | src/leap/common/events/server.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/leap/common/events/server.py b/src/leap/common/events/server.py index 861cb4f..dc55551 100644 --- a/src/leap/common/events/server.py +++ b/src/leap/common/events/server.py @@ -85,6 +85,7 @@ def ensure_server(port=SERVER_PORT): logger.info('Launching server on port %d.', port) return EventsServerDaemon.ensure(port) + def process_ping(port, request, response): """ Response callback for the ping event. @@ -100,7 +101,7 @@ def process_ping(port, request, response): logger.info('A server is already running on port %d.', port) return # port is taken, and not by an events server - logger.info('Port %d is taken by something not an events server.', port) + logger.warning('Port %d is taken by something not an events server.', port) raise PortAlreadyTaken(port) @@ -125,7 +126,7 @@ def ping(port=SERVER_PORT, reqcbk=None, timeout=1000): proto.EventsServerService_Stub, port, 'localhost') - logger.info("Pinging server in port %d..." % port) + logger.debug("Pinging server in port %d..." % port) return service.ping(request, callback=reqcbk, timeout=timeout) @@ -196,14 +197,14 @@ class EventsServerService(proto.EventsServerService): :param done: callback to be called when done :type done: protobuf.socketrpc.server.Callback """ - logger.info('Received signal from client: %s...', str(request)[:40]) + logger.debug('Received signal from client: %s...', str(request)[:40]) # send signal to all registered clients # TODO: verify signal auth if request.event in registered_clients: for port in registered_clients[request.event]: def callback(req, resp): - logger.info("Signal received by " + str(port)) + logger.debug("Signal received by " + str(port)) service = RpcService(proto.EventsClientService_Stub, port, 'localhost') @@ -224,7 +225,7 @@ class EventsServerService(proto.EventsServerService): :param done: callback to be called when done :type done: protobuf.socketrpc.server.Callback """ - logger.info("Received ping request, sending response.") + logger.debug("Received ping request, sending response.") response = proto.EventResponse() response.status = proto.EventResponse.OK done.run(response) |