summaryrefslogtreecommitdiff
path: root/src/leap/common/events/server.py
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2013-09-03 11:59:02 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2013-09-03 11:59:02 -0300
commitd367db764444c0befce425189acdf06339d1c566 (patch)
treeb0acf685b74a784565799851b0b18dd86d13faf2 /src/leap/common/events/server.py
parent03e5e612103bf129602032065cfe5917b8de8be5 (diff)
parent2c2f1eb7714bf98059b6966e08d01897c5626bd4 (diff)
Merge remote-tracking branch 'kali/bug/fix-exception' into develop
Diffstat (limited to 'src/leap/common/events/server.py')
-rw-r--r--src/leap/common/events/server.py11
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)