From 2e7217f10c890bc9ba768e6f5c54941673a80008 Mon Sep 17 00:00:00 2001 From: Paul Hebble Date: Thu, 9 Jul 2020 15:49:39 -0500 Subject: [PATCH] Init Curl at netkan startup --- Cmdline/Main.cs | 3 +++ Netkan/Program.cs | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/Cmdline/Main.cs b/Cmdline/Main.cs index 31c3e065c7..4cb2dc261d 100644 --- a/Cmdline/Main.cs +++ b/Cmdline/Main.cs @@ -55,6 +55,9 @@ public static int Main(string[] args) // This is on by default in .NET 4.6, but not in 4.5. ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12; + // Make sure Curl is all set up + Curl.Init(); + try { return Execute(null, null, args); diff --git a/Netkan/Program.cs b/Netkan/Program.cs index 69e702848d..b11de82084 100644 --- a/Netkan/Program.cs +++ b/Netkan/Program.cs @@ -5,10 +5,12 @@ using System.Net; using System.Text; using CommandLine; + using log4net; using log4net.Core; using Newtonsoft.Json; using Newtonsoft.Json.Linq; + using CKAN.Versioning; using CKAN.NetKAN.Model; using CKAN.NetKAN.Processors; @@ -44,6 +46,9 @@ public static int Main(string[] args) return ExitOk; } + // Make sure Curl is all set up + Curl.Init(); + if (!string.IsNullOrEmpty(Options.ValidateCkan)) { var ckan = new Metadata(JObject.Parse(File.ReadAllText(Options.ValidateCkan)));