mirror of
https://github.com/tsl0922/ttyd.git
synced 2025-12-23 04:14:18 +01:00
Add support for the --readonly option
This commit is contained in:
@@ -258,6 +258,8 @@ callback_tty(struct lws *wsi, enum lws_callback_reasons reason,
|
||||
|
||||
switch (command) {
|
||||
case INPUT:
|
||||
if (server->readonly)
|
||||
return 0;
|
||||
if (write(client->pty, client->buffer + 1, client->len - 1) < client->len - 1) {
|
||||
lwsl_err("write INPUT to pty\n");
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user