Changeset 142 for binary-improvements/7dtd-server-fixes
- Timestamp:
- Aug 29, 2014, 4:18:16 PM (10 years ago)
- Location:
- binary-improvements/7dtd-server-fixes
- Files:
-
- 4 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/7dtd-server-fixes.csproj
r140 r142 28 28 <ErrorReport>prompt</ErrorReport> 29 29 <WarningLevel>4</WarningLevel> 30 <ConsolePause>false</ConsolePause> 31 </PropertyGroup> 32 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Version|AnyCPU' "> 33 <DebugType>none</DebugType> 34 <Optimize>true</Optimize> 35 <OutputPath>..\bin\Release</OutputPath> 36 <ErrorReport>prompt</ErrorReport> 37 <WarningLevel>4</WarningLevel> 38 <CustomCommands> 39 <CustomCommands> 40 <Command type="AfterBuild" command="bash -c "monodis --assembly ${TargetFile} | grep Version > ${TargetDir}/${ProjectName}_version.txt"" /> 41 </CustomCommands> 42 </CustomCommands> 30 43 <ConsolePause>false</ConsolePause> 31 44 </PropertyGroup> … … 80 93 <Compile Include="src\NetConnections\Servers\Web\MimeType.cs" /> 81 94 <Compile Include="src\CustomCommands\EnableRendering.cs" /> 95 <Compile Include="src\PersistentData\PersistentContainer.cs" /> 96 <Compile Include="src\PersistentData\KnownPlayers.cs" /> 97 <Compile Include="src\StateManager.cs" /> 82 98 </ItemGroup> 83 99 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> … … 90 106 <Folder Include="src\NetConnections\Servers\Telnet\" /> 91 107 <Folder Include="src\NetConnections\Servers\Web\" /> 108 <Folder Include="src\PersistentData\" /> 92 109 </ItemGroup> 93 110 </Project> -
binary-improvements/7dtd-server-fixes/src/MapRendering/MapRenderBlockBuffer.cs
r130 r142 37 37 Directory.CreateDirectory (folder); 38 38 if (!fileName.Equals (currentBlockMap)) { 39 if (currentBlockMap.Length > 0) 40 saveTextureToFile (currentBlockMap); 39 SaveBlock(); 41 40 loadTextureFromFile (fileName); 42 41 } -
binary-improvements/7dtd-server-fixes/src/NetConnections/Servers/Telnet/Telnet.cs
r132 r142 113 113 string res = ""; 114 114 for (int i = 0; i < line.Length; i++) { 115 if (line [i] >= ' ' && line [i] != '\'' && line [i] <= '~') {115 if (line [i] >= ' ' && line [i] != '\'') { 116 116 res += line [i]; 117 117 } -
binary-improvements/7dtd-server-fixes/src/NetConnections/Servers/Telnet/TelnetConnection.cs
r132 r142 2 2 using System.Net; 3 3 using System.Net.Sockets; 4 using System.Text; 4 5 5 6 namespace AllocsFixes.NetConnections.Servers.Telnet … … 11 12 private TcpClient client; 12 13 private NetworkStream stream; 13 private string lineBuffer = string.Empty; 14 private int lineBufferLength = 0; 15 private byte[] lineBuffer = new byte[200]; 14 16 private EndPoint endpoint; 15 17 … … 38 40 try { 39 41 if (!IsClosed () && stream.CanWrite) { 40 for (int i = 0; i < s.Length; i++) { 41 WriteByte ((byte)s [i]); 42 } 42 byte[] utfData = Encoding.UTF8.GetBytes (s); 43 stream.Write(utfData, 0, utfData.Length); 43 44 WriteByte (13); 44 45 WriteByte (10); … … 79 80 int b = stream.ReadByte (); 80 81 if (b == '\r' || b == '\n') { 81 if (lineBuffer .Length > 0)82 if (lineBufferLength > 0) 82 83 return true; 83 } else { 84 lineBuffer += (char)b; 84 } else if (b >= 0) { 85 lineBuffer[lineBufferLength] = (byte)b; 86 lineBufferLength++; 85 87 } 86 88 } … … 90 92 public string GetLine () 91 93 { 92 string res = lineBuffer;93 lineBuffer = string.Empty;94 string res = Encoding.UTF8.GetString(lineBuffer, 0, lineBufferLength);; 95 lineBufferLength = 0; 94 96 return res; 95 97 } -
binary-improvements/7dtd-server-fixes/src/NetConnections/Servers/Web/Web.cs
r140 r142 113 113 { 114 114 try { 115 Log.Out ("NOT IMPLEMENTED: Web.WriteToClient");115 //Log.Out ("NOT IMPLEMENTED: Web.WriteToClient"); 116 116 } catch (Exception e) { 117 117 Log.Out ("Error in Web.WriteToClient: " + e); … … 122 122 { 123 123 try { 124 Log.Out ("NOT IMPLEMENTED: Web.WriteToClient_Single");124 //Log.Out ("NOT IMPLEMENTED: Web.WriteToClient_Single"); 125 125 } catch (Exception e) { 126 126 Log.Out ("Error in Web.WriteToClient_Single: " + e);
Note:
See TracChangeset
for help on using the changeset viewer.