aboutsummaryrefslogtreecommitdiff
path: root/utils/ttyd
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-12-20 20:18:43 -0800
committerRosen Penev <rosenp@gmail.com>2020-12-22 19:25:13 -0800
commitcafde49d2457376f393d72cee7f67b541536562a (patch)
treed3da84bf041661c289afa2eb497a5d3e23591e2f /utils/ttyd
parent55593507ab2552acd03e1e8fcdd01471bc7f509f (diff)
ttyd: update to 1.6.2
Remove upstream patch. Refreshed other one. Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'utils/ttyd')
-rw-r--r--utils/ttyd/Makefile6
-rw-r--r--utils/ttyd/patches/100-log-to-syslog.patch2
-rw-r--r--utils/ttyd/patches/200-protocol-fix-request-path-for-h2.patch62
3 files changed, 4 insertions, 66 deletions
diff --git a/utils/ttyd/Makefile b/utils/ttyd/Makefile
index bf4f07c38..c8c5df209 100644
--- a/utils/ttyd/Makefile
+++ b/utils/ttyd/Makefile
@@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ttyd
-PKG_VERSION:=1.6.1
-PKG_RELEASE:=3
+PKG_VERSION:=1.6.2
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/tsl0922/ttyd/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=d72dcca3dec00cda87b80a0a25ae4fee2f8b9098c1cdb558508dcb14fbb6fafc
+PKG_HASH:=fd3256099e1cc5c470220cbfbb3ab2c7fa1f92232c503f583556a8965aa83bac
PKG_MAINTAINER:=Shuanglei Tao <tsl0922@gmail.com>
PKG_LICENSE:=MIT
diff --git a/utils/ttyd/patches/100-log-to-syslog.patch b/utils/ttyd/patches/100-log-to-syslog.patch
index 04a3027c2..06012dfd9 100644
--- a/utils/ttyd/patches/100-log-to-syslog.patch
+++ b/utils/ttyd/patches/100-log-to-syslog.patch
@@ -8,7 +8,7 @@
#include "utils.h"
-@@ -441,7 +442,8 @@ int main(int argc, char **argv) {
+@@ -478,7 +479,8 @@ int main(int argc, char **argv) {
return -1;
}
diff --git a/utils/ttyd/patches/200-protocol-fix-request-path-for-h2.patch b/utils/ttyd/patches/200-protocol-fix-request-path-for-h2.patch
deleted file mode 100644
index 554d70bfc..000000000
--- a/utils/ttyd/patches/200-protocol-fix-request-path-for-h2.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From f7c171ffbe2d7677af4974a235ed3ccb7b3ba8c8 Mon Sep 17 00:00:00 2001
-From: Shuanglei Tao <tsl0922@gmail.com>
-Date: Tue, 28 Jul 2020 22:55:01 +0800
-Subject: [PATCH 2/7] protocol: fix request path for h2
-
----
- src/protocol.c | 12 +++++++-----
- src/server.h | 1 +
- 2 files changed, 8 insertions(+), 5 deletions(-)
-
-diff --git a/src/protocol.c b/src/protocol.c
-index fa96b6b..1be0a4e 100644
---- a/src/protocol.c
-+++ b/src/protocol.c
-@@ -236,8 +236,12 @@ int callback_tty(struct lws *wsi, enum lws_callback_reasons reason, void *user,
- lwsl_warn("refuse to serve WS client due to the --max-clients option.\n");
- return 1;
- }
-- if (lws_hdr_copy(wsi, buf, sizeof(buf), WSI_TOKEN_GET_URI) <= 0 ||
-- strcmp(buf, endpoints.ws) != 0) {
-+
-+ n = lws_hdr_copy(wsi, pss->path, sizeof(pss->path), WSI_TOKEN_GET_URI);
-+#if defined(LWS_ROLE_H2)
-+ if (n <= 0) n = lws_hdr_copy(wsi, pss->path, sizeof(pss->path), WSI_TOKEN_HTTP_COLON_PATH);
-+#endif
-+ if (strncmp(pss->path, endpoints.ws, n) != 0) {
- lwsl_warn("refuse to serve WS client for illegal ws path: %s\n", buf);
- return 1;
- }
-@@ -276,8 +280,6 @@ int callback_tty(struct lws *wsi, enum lws_callback_reasons reason, void *user,
- LIST_INSERT_HEAD(&server->procs, proc, entry);
- server->client_count++;
-
-- lws_hdr_copy(wsi, buf, sizeof(buf), WSI_TOKEN_GET_URI);
--
- #if LWS_LIBRARY_VERSION_NUMBER >= 2004000
- lws_get_peer_simple(lws_get_network_wsi(wsi), pss->address, sizeof(pss->address));
- #else
-@@ -285,7 +287,7 @@ int callback_tty(struct lws *wsi, enum lws_callback_reasons reason, void *user,
- lws_get_peer_addresses(wsi, lws_get_socket_fd(wsi), name, sizeof(name), pss->address,
- sizeof(pss->address));
- #endif
-- lwsl_notice("WS %s - %s, clients: %d\n", buf, pss->address, server->client_count);
-+ lwsl_notice("WS %s - %s, clients: %d\n", pss->path, pss->address, server->client_count);
- break;
-
- case LWS_CALLBACK_SERVER_WRITEABLE:
-diff --git a/src/server.h b/src/server.h
-index 116d9b9..167ea8b 100644
---- a/src/server.h
-+++ b/src/server.h
-@@ -57,6 +57,7 @@ struct pss_tty {
- int initial_cmd_index;
- bool authenticated;
- char address[50];
-+ char path[20];
-
- struct lws *wsi;
- char *buffer;
---
-2.20.1
-