Skip to content

Commit

Permalink
fix: passive won't match messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mattebit committed Mar 7, 2024
1 parent c0635bd commit 1303c15
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tool/src/main/java/migt/HTTPReqRes.java
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ public boolean matches_msg_type(MessageType msg_type, boolean is_request) {
);
} else {
// this check is done to avoid matching request messages when intercepting a response
if (is_request != msg_type.isRequest) return false;
if (is_request != msg_type.msg_to_process_is_request) return false;
if (!msg_type.isRequest && !isResponse) return false; // this message is not containing a response
matchedMessage = Tools.executeChecks(
msg_type.checks,
Expand Down
2 changes: 1 addition & 1 deletion tool/src/main/java/migt/Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ public boolean execute(List<HTTPReqRes> messageList,
currentOP.api.vars = vars;
}

if (messageList.get(i).matches_msg_type(msg_type, currentOP.api.is_request)) {
if (messageList.get(i).matches_msg_type(msg_type, msg_type.msg_to_process_is_request)) {
currentOP.setAPI(new Operation_API(messageList.get(i), msg_type.msg_to_process_is_request));
currentOP.execute();
res = currentOP.getResult();
Expand Down

0 comments on commit 1303c15

Please sign in to comment.