From 4cd1181ef7a03fbd2820829d8e77e5b93fcebeea Mon Sep 17 00:00:00 2001 From: Kevin Trocolli Date: Thu, 9 Nov 2023 21:09:55 -0500 Subject: [PATCH] sao: fix generic handler --- titles/sao/index.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/titles/sao/index.py b/titles/sao/index.py index ce5b826..84256fa 100644 --- a/titles/sao/index.py +++ b/titles/sao/index.py @@ -116,14 +116,15 @@ class SaoServlet(BaseServlet): handler = getattr(self.base, f"handle_{cmd_str}", None) if handler is None: self.logger.info(f"Generic Handler for {endpoint} - {cmd_str}") - self.logger.debug(f"Request: {request.content.getvalue().hex()}") - resp = SaoNoopResponse(req_header.cmd + 1) - self.logger.debug(f"Response: {resp.make().hex()}") - return resp.make() - - self.logger.info(f"Handler {endpoint} - {cmd_str} request") - self.logger.debug(f"Request: {request.content.getvalue().hex()}") - resp = handler(sao_request) + self.logger.debug(f"Request: {req_raw.hex()}") + resp_thing = SaoNoopResponse(req_header.cmd + 1) + resp = resp_thing.make() + + else: + self.logger.info(f"Handler {endpoint} - {cmd_str} request") + self.logger.debug(f"Request: {req_raw.hex()}") + resp = handler(sao_request) + self.logger.debug(f"Response: {resp.hex()}") if self.game_cfg.crypt.enable: