diff --git a/deluge/core/rpcserver.py b/deluge/core/rpcserver.py index 43ca7266a..a4e8a7e62 100644 --- a/deluge/core/rpcserver.py +++ b/deluge/core/rpcserver.py @@ -44,7 +44,7 @@ from deluge.core.authmanager import AUTH_LEVEL_NONE, AUTH_LEVEL_DEFAULT RPC_RESPONSE = 1 RPC_ERROR = 2 -RPC_SIGNAL = 3 +RPC_EVENT = 3 def export(auth_level=AUTH_LEVEL_DEFAULT): """ @@ -356,9 +356,9 @@ class RPCServer(component.Component): for session_id, interest in self.factory.interested_events.iteritems(): if event.name in interest: log.debug("Emit Event: %s %s", event.name, event.args) - # This session is interested so send a RPC_SIGNAL + # This session is interested so send a RPC_EVENT self.factory.session_protocols[session_id].sendData( - (RPC_SIGNAL, event.name, event.args) + (RPC_EVENT, event.name, event.args) ) def __generate_ssl_keys(self): diff --git a/deluge/ui/client.py b/deluge/ui/client.py index f7436ea54..628ebb384 100644 --- a/deluge/ui/client.py +++ b/deluge/ui/client.py @@ -38,7 +38,7 @@ else: RPC_RESPONSE = 1 RPC_ERROR = 2 -RPC_SIGNAL = 3 +RPC_EVENT = 3 def format_kwargs(kwargs): return ", ".join([key + "=" + str(value) for key, value in kwargs.items()]) @@ -144,14 +144,14 @@ class DelugeRPCProtocol(Protocol): message_type = request[0] - if message_type == RPC_SIGNAL: + if message_type == RPC_EVENT: event = request[1] # A RPCSignal was received from the daemon so run any handlers # associated with it. if event in self.factory.event_handlers: for handler in self.factory.event_handlers[event]: reactor.callLater(0, handler, *request[2]) - return + continue request_id = request[1]