From cc911b72129c712f249f3ab8e7a5d71ec88752b3 Mon Sep 17 00:00:00 2001 From: Falkvinge Date: Tue, 16 May 2017 12:01:02 +0200 Subject: [PATCH] Debugging --- Backend/BackendLoop.cs | 1 + FrontSocket/FrontendServices.cs | 3 +++ Site/Default.aspx.cs | 16 +++++++++++----- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Backend/BackendLoop.cs b/Backend/BackendLoop.cs index f2b3daf7..b7dbde7f 100644 --- a/Backend/BackendLoop.cs +++ b/Backend/BackendLoop.cs @@ -887,6 +887,7 @@ namespace Swarmops.Backend downstream["MessageType"] = "RecalculateOrganizationProfitLoss"; downstream["OrganizationId"] = message.OrganizationId.ToString(CultureInfo.InvariantCulture); Broadcast(downstream); + Console.WriteLine(@" - Recalculating P&L for orgId " + message.OrganizationId); break; default: // Unhandled. Exception? diff --git a/FrontSocket/FrontendServices.cs b/FrontSocket/FrontendServices.cs index a28ebdda..c093804f 100644 --- a/FrontSocket/FrontendServices.cs +++ b/FrontSocket/FrontendServices.cs @@ -56,6 +56,7 @@ namespace Swarmops.Frontend.Socket private void ProcessMetapackage(string xmlData) { + Console.WriteLine("Decoding XML: " + xmlData); SocketMessage message = SocketMessage.FromXml(xmlData); // Most should just be sent straight to backend. Some could possibly be processed already here. @@ -68,6 +69,7 @@ namespace Swarmops.Frontend.Socket default: // we're not handling here, send to backend + Console.WriteLine(" - sending " + message.MessageType + " upstream"); FrontendLoop.SendMessageUpstream(message); break; } @@ -84,6 +86,7 @@ namespace Swarmops.Frontend.Socket if (Authority.IsSystemAuthorityTokenValid(authBase64)) { _authority = null; // System authority + Console.WriteLine(" - - valid system authentication token"); } else { diff --git a/Site/Default.aspx.cs b/Site/Default.aspx.cs index 8c2b21e9..f62bfa18 100644 --- a/Site/Default.aspx.cs +++ b/Site/Default.aspx.cs @@ -1,5 +1,6 @@ using System; using Resources; +using Swarmops.Logic; using Swarmops.Logic.Financial; using Swarmops.Logic.Security; using Swarmops.Logic.Support; @@ -19,12 +20,17 @@ namespace Swarmops.Frontend this.PageAccessRequired = new Access (AccessAspect.Null, AccessType.Read); // dummy security until there's something to show on Dashboard - byte[] symmetricKey = SystemSettings.SymmetricEncryptionKeyFileSystem; - // Access forces initialization if it's not there: remove by Alpha-12 // TODO + // BEGIN TEST CODE - /* - this.LabelActionListMotions.Text = Resources.Pages.Governance.ListMotions_PageTitle; - this.LabelActionVote.Text = Resources.Pages.Governance.Vote_PageTitle;*/ + SocketMessage testMessage = new SocketMessage + { + MessageType = "Foo", + OrganizationId = 1 + }; + string messageXml = testMessage.ToXml(); + SocketMessage newMessage = SocketMessage.FromXml(messageXml); + + // END TEST CODE InfoBoxLiteral = "This is a Dashboard placeholder. It will contain a snapshot of the state of things as soon as the basic functions are re-implemented in the new interface.";