From df53cb0ec6b9e45ecad70614f91ecd651831008a Mon Sep 17 00:00:00 2001
From: Norris Ng <6787487+norrisng@users.noreply.github.com>
Date: Fri, 3 Apr 2020 19:39:06 -0700
Subject: [PATCH 1/5] Remove garbage data that appears right before FSD packets
---
FcomClient/FcomClient.UI/FcomClient.cs | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/FcomClient/FcomClient.UI/FcomClient.cs b/FcomClient/FcomClient.UI/FcomClient.cs
index ea69f28..e0ee14f 100644
--- a/FcomClient/FcomClient.UI/FcomClient.cs
+++ b/FcomClient/FcomClient.UI/FcomClient.cs
@@ -239,9 +239,15 @@ static void OnIncomingFsdPacket(object sender, CaptureEventArgs e)
// FsdPacket trims the newline, so we have to grab the byte[] ourselves
string pktString = System.Text.Encoding.UTF8.GetString(e.Packet.Data);
- string[] inputs = pktString.Split('\n');
- foreach (string input in inputs)
+ string[] inputs = pktString.Split(new String[] { "\n" }, StringSplitOptions.None);
+ foreach (string line in inputs)
{
+ // Strip out the garbage that appears in between FSD packets
+ string input = Regex.Replace(line, "^.*\\$", "$", RegexOptions.Multiline);
+ input = Regex.Replace(input, "^.*#", "#", RegexOptions.Multiline);
+ input = Regex.Replace(input, "^.*%", "%", RegexOptions.Multiline);
+ input = Regex.Replace(input, "^.*@", "@", RegexOptions.Multiline);
+
// First, create a FsdPacket object from the packet
FsdPacket currPacket = new FsdPacket(timestamp, input);
From dc148a2d79ef310aa263eafdb6770932bfd04fd1 Mon Sep 17 00:00:00 2001
From: Norris Ng <6787487+norrisng@users.noreply.github.com>
Date: Fri, 3 Apr 2020 19:40:37 -0700
Subject: [PATCH 2/5] Increment version number
---
FcomClient/Properties/AssemblyInfo.cs | 2 +-
README.md | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/FcomClient/Properties/AssemblyInfo.cs b/FcomClient/Properties/AssemblyInfo.cs
index b69b9e8..d0b23c6 100644
--- a/FcomClient/Properties/AssemblyInfo.cs
+++ b/FcomClient/Properties/AssemblyInfo.cs
@@ -32,4 +32,4 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("0.9")]
-[assembly: AssemblyFileVersion("0.9.1")]
+[assembly: AssemblyFileVersion("0.9.2")]
diff --git a/README.md b/README.md
index f6a8d04..6d5323d 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
The client that capture messages received over VATSIM / IVAO
-Version 0.9.1
+Version 0.9.2
## Requirements ##
From 672c1c9e31e0b45128aaafbedb88973438ecf7f9 Mon Sep 17 00:00:00 2001
From: Norris Ng <6787487+norrisng@users.noreply.github.com>
Date: Fri, 3 Apr 2020 21:09:50 -0700
Subject: [PATCH 3/5] Increment version number in user agent string for API
call
---
FcomClient/FcomClient.Serialization/ApiManager.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/FcomClient/FcomClient.Serialization/ApiManager.cs b/FcomClient/FcomClient.Serialization/ApiManager.cs
index df9645b..f4e7000 100644
--- a/FcomClient/FcomClient.Serialization/ApiManager.cs
+++ b/FcomClient/FcomClient.Serialization/ApiManager.cs
@@ -14,7 +14,7 @@ class ApiManager
///
/// User agent string to use.
///
- private readonly string CLIENT_VERSION = "FcomClient/0.9.1";
+ private readonly string CLIENT_VERSION = "FcomClient/0.9.2";
///
/// Server address, read from the file server_location.txt
From ea17dc8073e93b9c8d0d91cfd1abec85793623d3 Mon Sep 17 00:00:00 2001
From: Norris Ng <6787487+norrisng@users.noreply.github.com>
Date: Fri, 3 Apr 2020 21:22:04 -0700
Subject: [PATCH 4/5] Stop using AssemblyFileVersion for version numbers
---
FcomClient/Properties/AssemblyInfo.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/FcomClient/Properties/AssemblyInfo.cs b/FcomClient/Properties/AssemblyInfo.cs
index d0b23c6..9b4a3c3 100644
--- a/FcomClient/Properties/AssemblyInfo.cs
+++ b/FcomClient/Properties/AssemblyInfo.cs
@@ -31,5 +31,5 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("0.9")]
-[assembly: AssemblyFileVersion("0.9.2")]
+[assembly: AssemblyVersion("0.9.2")]
+//[assembly: AssemblyFileVersion("0.9.2")]
From e06f81b92a29927051b83350ef2ee2d67a815439 Mon Sep 17 00:00:00 2001
From: Norris Ng <6787487+norrisng@users.noreply.github.com>
Date: Fri, 3 Apr 2020 21:24:46 -0700
Subject: [PATCH 5/5] Remove unused imports
---
FcomClient/FcomClient.Serialization/FcomApiException.cs | 4 ----
1 file changed, 4 deletions(-)
diff --git a/FcomClient/FcomClient.Serialization/FcomApiException.cs b/FcomClient/FcomClient.Serialization/FcomApiException.cs
index 199b474..fcc4314 100644
--- a/FcomClient/FcomClient.Serialization/FcomApiException.cs
+++ b/FcomClient/FcomClient.Serialization/FcomApiException.cs
@@ -1,8 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace FcomClient.Serialization
{