Fix the OCDH program.

This commit is contained in:
Captain ALM 2019-12-29 12:06:27 +00:00
parent 739ae2e4e5
commit e9b88eb6d4
5 changed files with 15 additions and 2 deletions

View File

@ -6,11 +6,12 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<RootNamespace>OCDaemonHoster</RootNamespace> <RootNamespace>OCDaemonHoster</RootNamespace>
<AssemblyName>OCDaemonHoster</AssemblyName> <AssemblyName>OCDH</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<ApplicationIcon>..\Icon2.ico</ApplicationIcon> <ApplicationIcon>..\Icon2.ico</ApplicationIcon>
<NoWin32Manifest>False</NoWin32Manifest> <NoWin32Manifest>False</NoWin32Manifest>
<StartupObject>OCDaemonHoster.Program</StartupObject>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' "> <PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
@ -22,6 +23,7 @@
<Optimize>False</Optimize> <Optimize>False</Optimize>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<StartAction>Project</StartAction>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>

View File

@ -118,6 +118,7 @@ namespace captainalm.network.oc
try { try {
Thread.Sleep(100); Thread.Sleep(100);
} catch (ThreadInterruptedException e) { } catch (ThreadInterruptedException e) {
break;
} }
lout++; lout++;
} }

View File

@ -111,6 +111,7 @@ namespace captainalm.network.oc
try { try {
Thread.Sleep(100); Thread.Sleep(100);
} catch (ThreadInterruptedException e) { } catch (ThreadInterruptedException e) {
break;
} }
} }
sSock = null; sSock = null;
@ -122,6 +123,7 @@ namespace captainalm.network.oc
try { try {
Thread.Sleep(100); Thread.Sleep(100);
} catch (ThreadInterruptedException e) { } catch (ThreadInterruptedException e) {
break;
} }
} }
try { try {
@ -136,6 +138,7 @@ namespace captainalm.network.oc
try { try {
Thread.Sleep(100); Thread.Sleep(100);
} catch (ThreadInterruptedException e) { } catch (ThreadInterruptedException e) {
break;
} }
} }
} catch (SocketException e) { } catch (SocketException e) {

View File

@ -108,6 +108,7 @@ namespace OCDaemonHoster
try { try {
Thread.Sleep(100); Thread.Sleep(100);
} catch (ThreadInterruptedException e) { } catch (ThreadInterruptedException e) {
break;
} }
} }
server.close(); server.close();
@ -196,7 +197,7 @@ namespace OCDaemonHoster
if (isSwitch && !hasEquals) { if (isSwitch && !hasEquals) {
cSwitch = carg.Substring(1).ToLower(); cSwitch = carg.Substring(1).ToLower();
} else if (isSwitch && hasEquals) { } else if (isSwitch && hasEquals) {
cSwitch = carg.Substring(1, carg.IndexOf("=")).ToLower(); cSwitch = carg.Substring(1, carg.IndexOf("=") - 1).ToLower();
cValue = carg.Substring(carg.IndexOf("=") + 1); cValue = carg.Substring(carg.IndexOf("=") + 1);
} }
if (!settings.ContainsKey(cSwitch)) { if (!settings.ContainsKey(cSwitch)) {

View File

@ -4,6 +4,8 @@ Microsoft Visual Studio Solution File, Format Version 11.00
# SharpDevelop 4.4 # SharpDevelop 4.4
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "OCUploadDownloadServer", "OCUploadDownloadServer\OCUploadDownloadServer.vbproj", "{2FE6A11F-332C-4E6D-B161-E4F775FE53C0}" Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "OCUploadDownloadServer", "OCUploadDownloadServer\OCUploadDownloadServer.vbproj", "{2FE6A11F-332C-4E6D-B161-E4F775FE53C0}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OCDaemonHoster", "OCDaemonHoster\OCDaemonHoster.csproj", "{08F6D48F-9EAB-4861-9D50-F9F1BC10C074}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -14,5 +16,9 @@ Global
{2FE6A11F-332C-4E6D-B161-E4F775FE53C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2FE6A11F-332C-4E6D-B161-E4F775FE53C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2FE6A11F-332C-4E6D-B161-E4F775FE53C0}.Release|Any CPU.Build.0 = Release|Any CPU {2FE6A11F-332C-4E6D-B161-E4F775FE53C0}.Release|Any CPU.Build.0 = Release|Any CPU
{2FE6A11F-332C-4E6D-B161-E4F775FE53C0}.Release|Any CPU.ActiveCfg = Release|Any CPU {2FE6A11F-332C-4E6D-B161-E4F775FE53C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{08F6D48F-9EAB-4861-9D50-F9F1BC10C074}.Debug|Any CPU.Build.0 = Debug|Any CPU
{08F6D48F-9EAB-4861-9D50-F9F1BC10C074}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{08F6D48F-9EAB-4861-9D50-F9F1BC10C074}.Release|Any CPU.Build.0 = Release|Any CPU
{08F6D48F-9EAB-4861-9D50-F9F1BC10C074}.Release|Any CPU.ActiveCfg = Release|Any CPU
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal