From 96dd7e294d01c6cef41ee8f704b5aa7b9e4a8b29 Mon Sep 17 00:00:00 2001 From: Qv2ray-dev <59914293+Qv2ray-dev@users.noreply.github.com> Date: Thu, 23 Apr 2020 17:54:24 +0800 Subject: [PATCH] add: more arguments --- makespec/BUILDVERSION | 2 +- src/core/handler/KernelInstanceHandler.cpp | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/makespec/BUILDVERSION b/makespec/BUILDVERSION index 42ec4bb5..39c3d2f7 100644 --- a/makespec/BUILDVERSION +++ b/makespec/BUILDVERSION @@ -1 +1 @@ -5310 +5311 \ No newline at end of file diff --git a/src/core/handler/KernelInstanceHandler.cpp b/src/core/handler/KernelInstanceHandler.cpp index 83bb5caa..1f5b3ac3 100644 --- a/src/core/handler/KernelInstanceHandler.cpp +++ b/src/core/handler/KernelInstanceHandler.cpp @@ -179,7 +179,7 @@ namespace Qv2ray::core::handlers } else { - PluginHost->Send_ConnectivityEvent({ GetDisplayName(id), {}, Events::Connectivity::QvConnecticity_Disconnected }); + PluginHost->Send_ConnectivityEvent({ GetDisplayName(id), inboundPorts, Events::Connectivity::QvConnecticity_Disconnected }); } return result; } @@ -222,7 +222,7 @@ namespace Qv2ray::core::handlers auto result = vCoreInstance->StartConnection(fullConfig); if (result.has_value()) { - PluginHost->Send_ConnectivityEvent({ GetDisplayName(id), {}, Events::Connectivity::QvConnecticity_Disconnected }); + PluginHost->Send_ConnectivityEvent({ GetDisplayName(id), inboundPorts, Events::Connectivity::QvConnecticity_Disconnected }); } else { @@ -258,7 +258,8 @@ namespace Qv2ray::core::handlers { if (isConnected) { - PluginHost->Send_ConnectivityEvent({ GetDisplayName(currentConnectionId), {}, Events::Connectivity::QvConnecticity_Disconnecting }); + PluginHost->Send_ConnectivityEvent( + { GetDisplayName(currentConnectionId), inboundPorts, Events::Connectivity::QvConnecticity_Disconnecting }); if (vCoreInstance->KernelStarted) { vCoreInstance->StopConnection(); @@ -274,7 +275,7 @@ namespace Qv2ray::core::handlers ConnectionId id = currentConnectionId; currentConnectionId = NullConnectionId; emit OnDisconnected(id); - PluginHost->Send_ConnectivityEvent({ GetDisplayName(id), {}, Events::Connectivity::QvConnecticity_Disconnected }); + PluginHost->Send_ConnectivityEvent({ GetDisplayName(id), inboundPorts, Events::Connectivity::QvConnecticity_Disconnected }); } else {