refactor: unify buffer sizes to one

This commit is contained in:
2024-12-22 14:02:20 +01:00
parent 1b04a3acd8
commit 0fc369a26d
8 changed files with 22 additions and 25 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ PipeServer pipeServer(L"EtwTi");
DWORD WINAPI ServiceControlPipeThread(LPVOID param) {
wchar_t buffer[WCHAR_SMALL_PIPE];
wchar_t buffer[WCHAR_BUFFER_SIZE];
while (keep_running) {
LOG_W(LOG_INFO, L"Control: Waiting for client (RedEdr.exe) to connect...");
@@ -30,7 +30,7 @@ DWORD WINAPI ServiceControlPipeThread(LPVOID param) {
}
while (keep_running) {
memset(buffer, 0, sizeof(buffer));
if (!pipeServer.Receive(buffer, WCHAR_SMALL_PIPE)) {
if (!pipeServer.Receive(buffer, WCHAR_BUFFER_SIZE)) {
//LOG_A(LOG_ERROR, "Error waiting for RedEdr.exe config");
break;
}
+2 -2
View File
@@ -22,8 +22,8 @@ BOOL ConnectEmitterPipe() {
// Retrieve config (first packet)
// this is the only read for this pipe
wchar_t buffer[WCHAR_SMALL_PIPE];
if (pipeClient.Receive(buffer, WCHAR_SMALL_PIPE)) {
wchar_t buffer[WCHAR_BUFFER_SIZE];
if (pipeClient.Receive(buffer, WCHAR_BUFFER_SIZE)) {
// Ignore config atm
}