1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-10 14:12:58 +00:00

writefull() respects total inactivity timeout

This commit is contained in:
Gerhard Rieger 2025-01-10 19:41:34 +01:00
parent 1878ae93fd
commit 1154e69d3e
12 changed files with 31 additions and 15 deletions

View file

@ -376,7 +376,7 @@ int _xioopen_proxy_connect(struct single *sfd,
* xiosanitize(request, strlen(request), textbuff) = '\0';
Info1("sending \"%s\"", textbuff);
/* write errors are assumed to always be hard errors, no retry */
if (writefull(sfd->fd, request, strlen(request)) < 0) {
if (writefull(sfd->fd, request, strlen(request), NULL) < 0) {
Msg4(level, "write(%d, %p, "F_Zu"): %s",
sfd->fd, request, strlen(request), strerror(errno));
if (Close(sfd->fd) < 0) {
@ -406,7 +406,7 @@ int _xioopen_proxy_connect(struct single *sfd,
*next = '\0';
Info1("sending \"%s\\r\\n\"", header);
*next++ = '\r'; *next++ = '\n'; *next++ = '\0';
if (writefull(sfd->fd, header, strlen(header)) < 0) {
if (writefull(sfd->fd, header, strlen(header), NULL) < 0) {
Msg4(level, "write(%d, %p, "F_Zu"): %s",
sfd->fd, header, strlen(header), strerror(errno));
if (Close(sfd->fd) < 0) {
@ -419,7 +419,7 @@ int _xioopen_proxy_connect(struct single *sfd,
}
Info("sending \"\\r\\n\"");
if (writefull(sfd->fd, "\r\n", 2) < 0) {
if (writefull(sfd->fd, "\r\n", 2, NULL) < 0) {
Msg2(level, "write(%d, \"\\r\\n\", 2): %s",
sfd->fd, strerror(errno));
if (Close(sfd->fd) < 0) {