diff --git a/DVMHost.sln b/DVMHost.sln
index 98211087..bf544b6e 100644
--- a/DVMHost.sln
+++ b/DVMHost.sln
@@ -5,6 +5,8 @@ VisualStudioVersion = 16.0.28729.10
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dvmhost", "DVMHost.vcxproj", "{1D34E8C1-CFA5-4D60-B509-9DB58DC4AE92}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dvmcmd", "remote\DVMCmd.vcxproj", "{7686FC39-EC3C-4FAC-8C7D-32CF98D14F16}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -27,12 +29,23 @@ Global
{1D34E8C1-CFA5-4D60-B509-9DB58DC4AE92}.Release|x64.Build.0 = Release|x64
{1D34E8C1-CFA5-4D60-B509-9DB58DC4AE92}.Release|x86.ActiveCfg = Release|Win32
{1D34E8C1-CFA5-4D60-B509-9DB58DC4AE92}.Release|x86.Build.0 = Release|Win32
+ {7686FC39-EC3C-4FAC-8C7D-32CF98D14F16}.Debug|Any CPU.ActiveCfg = Debug|Win32
+ {7686FC39-EC3C-4FAC-8C7D-32CF98D14F16}.Debug|Any CPU.Build.0 = Debug|Win32
+ {7686FC39-EC3C-4FAC-8C7D-32CF98D14F16}.Debug|x64.ActiveCfg = Debug|x64
+ {7686FC39-EC3C-4FAC-8C7D-32CF98D14F16}.Debug|x64.Build.0 = Debug|x64
+ {7686FC39-EC3C-4FAC-8C7D-32CF98D14F16}.Debug|x86.ActiveCfg = Debug|Win32
+ {7686FC39-EC3C-4FAC-8C7D-32CF98D14F16}.Debug|x86.Build.0 = Debug|Win32
+ {7686FC39-EC3C-4FAC-8C7D-32CF98D14F16}.Release|Any CPU.ActiveCfg = Release|Win32
+ {7686FC39-EC3C-4FAC-8C7D-32CF98D14F16}.Release|Any CPU.Build.0 = Release|Win32
+ {7686FC39-EC3C-4FAC-8C7D-32CF98D14F16}.Release|x64.ActiveCfg = Release|x64
+ {7686FC39-EC3C-4FAC-8C7D-32CF98D14F16}.Release|x64.Build.0 = Release|x64
+ {7686FC39-EC3C-4FAC-8C7D-32CF98D14F16}.Release|x86.ActiveCfg = Release|Win32
+ {7686FC39-EC3C-4FAC-8C7D-32CF98D14F16}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {3CD6A8DC-348C-4B31-99A0-91AEE2F79121}
EndGlobalSection
EndGlobal
diff --git a/DVMHost.vcxproj b/DVMHost.vcxproj
index 20fbdd41..adab1635 100644
--- a/DVMHost.vcxproj
+++ b/DVMHost.vcxproj
@@ -244,7 +244,6 @@
-
@@ -292,6 +291,7 @@
+
@@ -313,28 +313,26 @@
-
- Document
-
-
- Document
-
+
+ true
+
+
+ true
+
-
-
-
- Document
-
Document
-
- Document
-
+
+ true
+
+
+ true
+
-
\ No newline at end of file
+
diff --git a/DVMHost.vcxproj.filters b/DVMHost.vcxproj.filters
index 3bf2aa99..5b927acd 100644
--- a/DVMHost.vcxproj.filters
+++ b/DVMHost.vcxproj.filters
@@ -595,22 +595,23 @@
Source Files\host\setup
+
+ Source Files
+
Source Files\p25\dfsi
-
-
+
+
+
+
-
-
-
-
\ No newline at end of file
diff --git a/host/Host.cpp b/host/Host.cpp
index 762bd304..4c3bb9ad 100644
--- a/host/Host.cpp
+++ b/host/Host.cpp
@@ -1599,9 +1599,14 @@ bool Host::createModem()
}
if (portType == PTY_PORT) {
+#if !defined(_WIN32) && !defined(_WIN64)
modemPort = new port::PseudoPTYPort(uartPort, serialSpeed, true);
LogInfo(" PTY File: %s", uartPort.c_str());
LogInfo(" PTY Speed: %u", uartSpeed);
+#else
+ LogError(LOG_HOST, "Pseudo PTY is not supported on Windows!");
+ return false;
+#endif
}
else {
modemPort = new port::UARTPort(uartPort, serialSpeed, true);
diff --git a/modem/port/PseudoPTYPort.cpp b/modem/port/PseudoPTYPort.cpp
index 8bc00f6f..cf484750 100644
--- a/modem/port/PseudoPTYPort.cpp
+++ b/modem/port/PseudoPTYPort.cpp
@@ -34,10 +34,10 @@
#include
#include
-using namespace modem::port;
-
#if !defined(_WIN32) && !defined(_WIN64)
+using namespace modem::port;
+
#include
#include
#include
diff --git a/network/Network.cpp b/network/Network.cpp
index 70e0a79a..1ac7d8a7 100644
--- a/network/Network.cpp
+++ b/network/Network.cpp
@@ -531,7 +531,7 @@ bool Network::writeConfig()
json::value v = json::value(config);
std::string json = v.serialize();
- char buffer[json.length() + 8U];
+ char* buffer = new char[json.length() + 8U];
::memcpy(buffer + 0U, TAG_REPEATER_CONFIG, 4U);
__SET_UINT32(m_id, buffer, 4U);
@@ -541,7 +541,9 @@ bool Network::writeConfig()
Utils::dump(1U, "Network Transmitted, Configuration", (uint8_t*)buffer, json.length() + 8U);
}
- return write((uint8_t*)buffer, json.length() + 8U);
+ bool ret = write((uint8_t*)buffer, json.length() + 8U);
+ delete[] buffer;
+ return ret;
}
///
diff --git a/p25/DataPacket.cpp b/p25/DataPacket.cpp
index a4e71dd3..cf6b2b77 100644
--- a/p25/DataPacket.cpp
+++ b/p25/DataPacket.cpp
@@ -673,7 +673,7 @@ void DataPacket::writeRF_PDU_Buffered()
uint32_t bitLength = ((m_rfDataHeader.getBlocksToFollow() + 1U) * P25_PDU_FEC_LENGTH_BITS) + P25_PREAMBLE_LENGTH_BITS;
uint32_t offset = P25_PREAMBLE_LENGTH_BITS;
- uint8_t data[bitLength / 8U];
+ uint8_t* data = new uint8_t[bitLength / 8U];
::memset(data, 0x00U, bitLength / 8U);
uint8_t block[P25_PDU_FEC_LENGTH_BYTES];
::memset(block, 0x00U, P25_PDU_FEC_LENGTH_BYTES);
@@ -712,6 +712,7 @@ void DataPacket::writeRF_PDU_Buffered()
}
writeRF_PDU(data, bitLength);
+ delete[] data;
}
///
@@ -728,7 +729,7 @@ void DataPacket::writeRF_PDU_Reg_Response(uint8_t regType, uint32_t llId, ulong6
uint32_t bitLength = (2U * P25_PDU_FEC_LENGTH_BITS) + P25_PREAMBLE_LENGTH_BITS;
uint32_t offset = P25_PREAMBLE_LENGTH_BITS;
- uint8_t data[bitLength / 8U];
+ uint8_t* data = new uint8_t[bitLength / 8U];
::memset(data, 0x00U, bitLength / 8U);
uint8_t block[P25_PDU_FEC_LENGTH_BYTES];
::memset(block, 0x00U, P25_PDU_FEC_LENGTH_BYTES);
@@ -775,6 +776,7 @@ void DataPacket::writeRF_PDU_Reg_Response(uint8_t regType, uint32_t llId, ulong6
Utils::setBitRange(block, data, offset, P25_PDU_FEC_LENGTH_BITS);
writeRF_PDU(data, bitLength);
+ delete[] data;
}
///
@@ -791,7 +793,7 @@ void DataPacket::writeRF_PDU_Ack_Response(uint8_t ackClass, uint8_t ackType, uin
uint32_t bitLength = (2U * P25_PDU_FEC_LENGTH_BITS) + P25_PREAMBLE_LENGTH_BITS;
uint32_t offset = P25_PREAMBLE_LENGTH_BITS;
- uint8_t data[bitLength / 8U];
+ uint8_t* data = new uint8_t[bitLength / 8U];
::memset(data, 0x00U, bitLength / 8U);
uint8_t block[P25_PDU_FEC_LENGTH_BYTES];
::memset(block, 0x00U, P25_PDU_FEC_LENGTH_BYTES);
@@ -818,6 +820,7 @@ void DataPacket::writeRF_PDU_Ack_Response(uint8_t ackClass, uint8_t ackType, uin
Utils::setBitRange(block, data, offset, P25_PDU_FEC_LENGTH_BITS);
writeRF_PDU(data, bitLength);
+ delete[] data;
}
///
diff --git a/p25/dfsi/LC.cpp b/p25/dfsi/LC.cpp
index b82e899f..7c53e0fd 100644
--- a/p25/dfsi/LC.cpp
+++ b/p25/dfsi/LC.cpp
@@ -382,7 +382,7 @@ void LC::encodeLDU1(uint8_t* data, const uint8_t* imbe)
break;
}
- uint8_t dfsiFrame[frameLength];
+ uint8_t* dfsiFrame = new uint8_t[frameLength];
::memset(dfsiFrame, 0x00U, frameLength);
dfsiFrame[0U] = m_frameType; // Frame Type
@@ -469,6 +469,7 @@ void LC::encodeLDU1(uint8_t* data, const uint8_t* imbe)
#endif
::memcpy(data, dfsiFrame, frameLength);
+ delete[] dfsiFrame;
}
///
@@ -619,7 +620,7 @@ void LC::encodeLDU2(uint8_t* data, const uint8_t* imbe)
break;
}
- uint8_t dfsiFrame[frameLength];
+ uint8_t* dfsiFrame = new uint8_t[frameLength];
::memset(dfsiFrame, 0x00U, frameLength);
dfsiFrame[0U] = m_frameType; // Frame Type
@@ -708,6 +709,7 @@ void LC::encodeLDU2(uint8_t* data, const uint8_t* imbe)
#endif
::memcpy(data, dfsiFrame, frameLength);
+ delete[] dfsiFrame;
}
///
diff --git a/remote/DVMCmd.vcxproj b/remote/DVMCmd.vcxproj
index 1e186e8f..27bb2794 100644
--- a/remote/DVMCmd.vcxproj
+++ b/remote/DVMCmd.vcxproj
@@ -72,7 +72,7 @@
true
- $(ProjectDir);$(IncludePath)
+ $(ProjectDir)..;$(ProjectDir);$(IncludePath)
true
@@ -80,7 +80,7 @@
false
- $(ProjectDir);$(IncludePath)
+ $(ProjectDir)..;$(ProjectDir);$(IncludePath)
false
@@ -152,20 +152,17 @@
-
-
+
+
+
+
-
-
+
+
+
-
-
-
-
-
-
diff --git a/remote/DVMCmd.vcxproj.filters b/remote/DVMCmd.vcxproj.filters
index 997fd1e5..2e85f2f2 100644
--- a/remote/DVMCmd.vcxproj.filters
+++ b/remote/DVMCmd.vcxproj.filters
@@ -26,30 +26,31 @@
Header Files
-
+
+ Header Files\edac
+
+
Header Files\network
-
+
Header Files
-
- Header Files\edac
+
+ Header Files
Source Files
-
+
+ Source Files\edac
+
+
Source Files\network
-
- Source Files\edac
+
+ Source Files
-
-
-
-
-
\ No newline at end of file