Skip to content

Commit 01ecf58

Browse files
Update openhd_sys_utils.cpp
1 parent 52acd98 commit 01ecf58

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/openhd_sys_utils.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,16 @@ bool handleClientData(int fd, std::unordered_map<int, std::string>& buffers) {
317317
std::cout << "sysutils => " << response;
318318
}
319319
(void)sendAll(fd, response);
320+
} else if (auto type = sysutil::extract_string_field(line, "type");
321+
type && type->rfind("sysutil.", 0) == 0) {
322+
std::ostringstream out;
323+
out << "{\"type\":\"sysutil.error\",\"ok\":false,"
324+
"\"message\":\"Unknown sysutil request: "
325+
<< *type << "\"}\n";
326+
if (gDebug) {
327+
std::cout << "sysutils => " << out.str();
328+
}
329+
(void)sendAll(fd, out.str());
320330
} else {
321331
sysutil::handle_status_message(line);
322332
}

0 commit comments

Comments
 (0)