From d975dffa5349bf096b08caeea4d1635f95a622ee Mon Sep 17 00:00:00 2001 From: Edward Emelianov Date: Thu, 7 Dec 2023 12:15:31 +0300 Subject: [PATCH] make tty buffer less (to avoid long waiting on a lot data sequence) --- ttysocket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ttysocket.c b/ttysocket.c index eb65f28..6276d9b 100644 --- a/ttysocket.c +++ b/ttysocket.c @@ -335,8 +335,8 @@ static TTY_descr2* opentty(){ tcflag_t flags; descr->format = parse_format(device->port, &flags); if(!descr->format) goto someerr; - descr->buf = MALLOC(uint8_t, BUFSIZ); - descr->bufsz = BUFSIZ-1; + descr->buf = MALLOC(uint8_t, 512); + descr->bufsz = 511; if((descr->comfd = open(descr->portname, O_RDWR|O_NOCTTY)) < 0){ WARN(_("Can't use port %s"), descr->portname); goto someerr;