From 71055fe17247153bf159bdad3ce345a19d82ce56 Mon Sep 17 00:00:00 2001 From: Jiri Date: Fri, 10 Jun 2022 16:03:04 +0200 Subject: [PATCH] FSvms now goes around all agent caching This seesm to be better then to try to store soem fake FS agents (as session agents) and deal with them. --- .../java/org/jrd/backend/core/DecompilerRequestReceiver.java | 5 +++++ .../src/main/java/org/jrd/backend/data/VmInfo.java | 3 +++ 2 files changed, 8 insertions(+) diff --git a/runtime-decompiler/src/main/java/org/jrd/backend/core/DecompilerRequestReceiver.java b/runtime-decompiler/src/main/java/org/jrd/backend/core/DecompilerRequestReceiver.java index 2d1275b1..820c8c99 100644 --- a/runtime-decompiler/src/main/java/org/jrd/backend/core/DecompilerRequestReceiver.java +++ b/runtime-decompiler/src/main/java/org/jrd/backend/core/DecompilerRequestReceiver.java @@ -153,6 +153,11 @@ private static ResponseWithPort getResponse( nativeAgent = new CallDecompilerAgent(actualListenPort, hostname); } else { VmInfo vmInfo = vmManager.findVmFromPid(vmId); + VmDecompilerStatus status = new VmDecompilerStatus(); + status.setHostname("localhost"); + status.setListenPort(vmPid); + status.setVmId(vmId); + vmInfo.setVmDecompilerStatus(status); nativeAgent = FsAgent.get(vmInfo); } String reply = nativeAgent.submitRequest(requestBody); diff --git a/runtime-decompiler/src/main/java/org/jrd/backend/data/VmInfo.java b/runtime-decompiler/src/main/java/org/jrd/backend/data/VmInfo.java index c3966cb5..bdcbc443 100644 --- a/runtime-decompiler/src/main/java/org/jrd/backend/data/VmInfo.java +++ b/runtime-decompiler/src/main/java/org/jrd/backend/data/VmInfo.java @@ -63,6 +63,9 @@ public VmInfo(String vmId, int vmPid, String vmName, Type type, List cp) { } public VmDecompilerStatus getVmDecompilerStatus() { + if (getType() == Type.FS) { + return vmDecompilerStatus; + } if (vmDecompilerStatus != null) { KnownAgents.getInstance().verifyAgents(); List found = KnownAgents.getInstance().findAgents(