mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 14:25:59 +01:00
unrestrict hyprctl message size
This commit is contained in:
parent
83ad59fae7
commit
46e51a81c4
1 changed files with 13 additions and 1 deletions
|
@ -80,6 +80,7 @@ void request(std::string arg) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string reply = "";
|
||||||
char buffer[8192] = {0};
|
char buffer[8192] = {0};
|
||||||
|
|
||||||
sizeWritten = read(SERVERSOCKET, buffer, 8192);
|
sizeWritten = read(SERVERSOCKET, buffer, 8192);
|
||||||
|
@ -89,9 +90,20 @@ void request(std::string arg) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reply += std::string(buffer, sizeWritten);
|
||||||
|
|
||||||
|
while (sizeWritten == 8192) {
|
||||||
|
sizeWritten = read(SERVERSOCKET, buffer, 8192);
|
||||||
|
if (sizeWritten < 0) {
|
||||||
|
std::cout << "Couldn't read (5)";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
reply += std::string(buffer, sizeWritten);
|
||||||
|
}
|
||||||
|
|
||||||
close(SERVERSOCKET);
|
close(SERVERSOCKET);
|
||||||
|
|
||||||
std::cout << std::string(buffer);
|
std::cout << reply;
|
||||||
}
|
}
|
||||||
|
|
||||||
void requestHyprpaper(std::string arg) {
|
void requestHyprpaper(std::string arg) {
|
||||||
|
|
Loading…
Reference in a new issue