From ce69721bd23e4c844ed1b5a3d5551276e4518333 Mon Sep 17 00:00:00 2001 From: Lee Date: Tue, 16 Aug 2022 13:56:24 -0700 Subject: [PATCH 1/7] false for all --- .../ConnectionReauthenticator.cs | 3 ++- edgelet/hsm-sys/azure-iot-hsm-c/deps/c-shared | 1 + edgelet/hsm-sys/azure-iot-hsm-c/deps/utpm | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) create mode 160000 edgelet/hsm-sys/azure-iot-hsm-c/deps/c-shared create mode 160000 edgelet/hsm-sys/azure-iot-hsm-c/deps/utpm diff --git a/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/ConnectionReauthenticator.cs b/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/ConnectionReauthenticator.cs index 481b8c481e7..ede17dab823 100644 --- a/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/ConnectionReauthenticator.cs +++ b/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/ConnectionReauthenticator.cs @@ -76,7 +76,8 @@ async void ReauthenticateConnections(object sender, ElapsedEventArgs elapsedEven .Map( async c => { - bool authRes = await this.authenticator.ReauthenticateAsync(c); + Console.WriteLine("Returning false for all clients."); + bool authRes = false; // await this.authenticator.ReauthenticateAsync(c); Events.ClientCredentialsResult(identity, authRes); return authRes; }) diff --git a/edgelet/hsm-sys/azure-iot-hsm-c/deps/c-shared b/edgelet/hsm-sys/azure-iot-hsm-c/deps/c-shared new file mode 160000 index 00000000000..6f7bbcd23b3 --- /dev/null +++ b/edgelet/hsm-sys/azure-iot-hsm-c/deps/c-shared @@ -0,0 +1 @@ +Subproject commit 6f7bbcd23b39481dc0cf93185555d2513beea1ea diff --git a/edgelet/hsm-sys/azure-iot-hsm-c/deps/utpm b/edgelet/hsm-sys/azure-iot-hsm-c/deps/utpm new file mode 160000 index 00000000000..d679c45ce95 --- /dev/null +++ b/edgelet/hsm-sys/azure-iot-hsm-c/deps/utpm @@ -0,0 +1 @@ +Subproject commit d679c45ce959c1b855a9500f57da2d31f0f8cca6 From 25dd7eb9642323918acb26b5a39037f5b1a53349 Mon Sep 17 00:00:00 2001 From: Lee Date: Tue, 16 Aug 2022 14:23:59 -0700 Subject: [PATCH 2/7] remove old packages --- edgelet/hsm-sys/azure-iot-hsm-c/deps/c-shared | 1 - edgelet/hsm-sys/azure-iot-hsm-c/deps/utpm | 1 - 2 files changed, 2 deletions(-) delete mode 160000 edgelet/hsm-sys/azure-iot-hsm-c/deps/c-shared delete mode 160000 edgelet/hsm-sys/azure-iot-hsm-c/deps/utpm diff --git a/edgelet/hsm-sys/azure-iot-hsm-c/deps/c-shared b/edgelet/hsm-sys/azure-iot-hsm-c/deps/c-shared deleted file mode 160000 index 6f7bbcd23b3..00000000000 --- a/edgelet/hsm-sys/azure-iot-hsm-c/deps/c-shared +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6f7bbcd23b39481dc0cf93185555d2513beea1ea diff --git a/edgelet/hsm-sys/azure-iot-hsm-c/deps/utpm b/edgelet/hsm-sys/azure-iot-hsm-c/deps/utpm deleted file mode 160000 index d679c45ce95..00000000000 --- a/edgelet/hsm-sys/azure-iot-hsm-c/deps/utpm +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d679c45ce959c1b855a9500f57da2d31f0f8cca6 From f0d68cf2314d04fa115caddc2423fa32a77e87f2 Mon Sep 17 00:00:00 2001 From: Lee Date: Tue, 16 Aug 2022 14:45:17 -0700 Subject: [PATCH 3/7] fix --- .../ConnectionReauthenticator.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/ConnectionReauthenticator.cs b/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/ConnectionReauthenticator.cs index ede17dab823..c9f46f1dfaf 100644 --- a/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/ConnectionReauthenticator.cs +++ b/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/ConnectionReauthenticator.cs @@ -77,9 +77,9 @@ async void ReauthenticateConnections(object sender, ElapsedEventArgs elapsedEven async c => { Console.WriteLine("Returning false for all clients."); - bool authRes = false; // await this.authenticator.ReauthenticateAsync(c); - Events.ClientCredentialsResult(identity, authRes); - return authRes; + // bool authRes = await this.authenticator.ReauthenticateAsync(c); + // Events.ClientCredentialsResult(identity, authRes); + return Task.FromResult(false); }) .GetOrElse( () => From 53e9fd2f41be5c0b918eb016f536426c07350c47 Mon Sep 17 00:00:00 2001 From: Lee Date: Tue, 16 Aug 2022 14:54:09 -0700 Subject: [PATCH 4/7] fix2 --- .../ConnectionReauthenticator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/ConnectionReauthenticator.cs b/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/ConnectionReauthenticator.cs index c9f46f1dfaf..54b4089b4d9 100644 --- a/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/ConnectionReauthenticator.cs +++ b/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/ConnectionReauthenticator.cs @@ -74,7 +74,7 @@ async void ReauthenticateConnections(object sender, ElapsedEventArgs elapsedEven Option clientCredentials = await this.credentialsCache.Get(identity); bool result = await clientCredentials .Map( - async c => + c => { Console.WriteLine("Returning false for all clients."); // bool authRes = await this.authenticator.ReauthenticateAsync(c); From cf5f546e954c4a351392c3bdb19904f1caf49022 Mon Sep 17 00:00:00 2001 From: Lee Date: Wed, 17 Aug 2022 13:56:18 -0700 Subject: [PATCH 5/7] add stacktraces --- .../device/DeviceMessageHandler.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/device/DeviceMessageHandler.cs b/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/device/DeviceMessageHandler.cs index eac51d8b59d..02b19f486cc 100644 --- a/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/device/DeviceMessageHandler.cs +++ b/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/device/DeviceMessageHandler.cs @@ -522,9 +522,16 @@ public async Task InvokeMethodAsync(DirectMethodRequest re return await taskCompletion.Task; } - public Task OnDesiredPropertyUpdates(IMessage twinUpdates) => this.underlyingProxy.OnDesiredPropertyUpdates(twinUpdates); + public Task OnDesiredPropertyUpdates(IMessage twinUpdates){ + Console.WriteLine("OnDesiredPropertyUpdates StackTrace: '{0}'", Environment.StackTrace); + return this.underlyingProxy.OnDesiredPropertyUpdates(twinUpdates); + } - public Task SendTwinUpdate(IMessage twin) => this.underlyingProxy.SendTwinUpdate(twin); + public Task SendTwinUpdate(IMessage twin) { + // print stack trace here + Console.WriteLine("SendTwinUpdate StackTrace: '{0}'", Environment.StackTrace); + return this.underlyingProxy.SendTwinUpdate(twin); + } public Task CloseAsync(Exception ex) => this.underlyingProxy.CloseAsync(ex); From beee43f15f5ae027cde2422a278d7fd7b9a6cb0f Mon Sep 17 00:00:00 2001 From: Lee Date: Wed, 17 Aug 2022 14:29:33 -0700 Subject: [PATCH 6/7] fmt --- .../device/DeviceMessageHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/device/DeviceMessageHandler.cs b/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/device/DeviceMessageHandler.cs index 02b19f486cc..8042b41b208 100644 --- a/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/device/DeviceMessageHandler.cs +++ b/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/device/DeviceMessageHandler.cs @@ -522,7 +522,7 @@ public async Task InvokeMethodAsync(DirectMethodRequest re return await taskCompletion.Task; } - public Task OnDesiredPropertyUpdates(IMessage twinUpdates){ + public Task OnDesiredPropertyUpdates(IMessage twinUpdates) { Console.WriteLine("OnDesiredPropertyUpdates StackTrace: '{0}'", Environment.StackTrace); return this.underlyingProxy.OnDesiredPropertyUpdates(twinUpdates); } From 07d8f8de93933a6aa6149b965728a4a4173e5e83 Mon Sep 17 00:00:00 2001 From: Lee Date: Wed, 17 Aug 2022 14:45:18 -0700 Subject: [PATCH 7/7] fmt 2 --- .../device/DeviceMessageHandler.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/device/DeviceMessageHandler.cs b/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/device/DeviceMessageHandler.cs index 8042b41b208..98fd021c23e 100644 --- a/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/device/DeviceMessageHandler.cs +++ b/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/device/DeviceMessageHandler.cs @@ -522,12 +522,14 @@ public async Task InvokeMethodAsync(DirectMethodRequest re return await taskCompletion.Task; } - public Task OnDesiredPropertyUpdates(IMessage twinUpdates) { + public Task OnDesiredPropertyUpdates(IMessage twinUpdates) + { Console.WriteLine("OnDesiredPropertyUpdates StackTrace: '{0}'", Environment.StackTrace); return this.underlyingProxy.OnDesiredPropertyUpdates(twinUpdates); } - public Task SendTwinUpdate(IMessage twin) { + public Task SendTwinUpdate(IMessage twin) + { // print stack trace here Console.WriteLine("SendTwinUpdate StackTrace: '{0}'", Environment.StackTrace); return this.underlyingProxy.SendTwinUpdate(twin);