From 54802b999f2ba8a9f317bd2e169b4a173bc98942 Mon Sep 17 00:00:00 2001 From: Stricted Date: Thu, 12 Jan 2017 04:31:21 +0100 Subject: [PATCH] write errorlog on ping only in debug build --- SpeedportHybridControl.Implementations/util.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/SpeedportHybridControl.Implementations/util.cs b/SpeedportHybridControl.Implementations/util.cs index fc743f2..4c807bb 100644 --- a/SpeedportHybridControl.Implementations/util.cs +++ b/SpeedportHybridControl.Implementations/util.cs @@ -249,19 +249,23 @@ namespace SpeedportHybridControl.Implementations Ping ping = new Ping(); try { - PingReply reply = ping.Send("172.10.10.2", 2); + PingReply reply = ping.Send("172.10.10.1", 2); if (reply.Status == IPStatus.Success) { return true; } +#if DEBUG else { LogManager.WriteToLog("unable to reach LTE Modul"); } +#endif } catch (PingException) { +#if DEBUG LogManager.WriteToLog("unable to reach LTE Modul"); +#endif } return false; @@ -282,7 +286,7 @@ namespace SpeedportHybridControl.Implementations } catch (Exception) { - new Thread(() => { MessageBox.Show("couldn't send Command to LTE Modul", MessageBoxButton.OK, MessageBoxImage.Error); }).Start(); + new Thread(() => { MessageBox.Show("couldn't send Command to LTE Modul", "Confirmation", MessageBoxButton.OK, MessageBoxImage.Error); }).Start(); LogManager.WriteToLog("couldn't send Command to LTE Modul"); } } -- 2.20.1