mirror of
https://github.com/dobin/RedEdr
synced 2026-08-09 12:30:51 +00:00
refactor: unify buffer sizes to one
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user