aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2024-07-08 20:06:02 +0000
committerOmar Polo <op@omarpolo.com>2024-07-08 20:06:02 +0000
commit0206e8c7a235411c6c9c9bda0aa8d03d5d760d9c (patch)
treeade23ad5b066b9a29948b1cbfe967aec738afd20
parent3d1148d9a46c7da6b5f63ae7a95f5ed2376c89c4 (diff)
remove trailing whitespaces and extra braces
-rw-r--r--server.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/server.c b/server.c
index fb975ab..f2f5c7b 100644
--- a/server.c
+++ b/server.c
@@ -1309,7 +1309,7 @@ read_cb(struct tls *ctx, void *buf, size_t buflen, void *cb_arg)
ret = read(c->fd, buf, buflen);
if (ret == -1 && errno == EWOULDBLOCK)
ret = TLS_WANT_POLLIN;
-
+
return ret;
}
@@ -1353,9 +1353,8 @@ read_cb(struct tls *ctx, void *buf, size_t buflen, void *cb_arg)
break;
}
- if (pp1.proto != PROTO_UNKNOWN) {
+ if (pp1.proto != PROTO_UNKNOWN)
snprintf(c->rserv, sizeof(c->rserv), "%u", pp1.srcport);
- }
proxy_proto_v1_string(&pp1, protostr, sizeof(protostr));
log_debug("proxy-protocol v1: %s", protostr);
@@ -1369,7 +1368,7 @@ read_cb(struct tls *ctx, void *buf, size_t buflen, void *cb_arg)
c->proxy_proto = c->buf.read_pos = 0;
c->buf.has_tail = 0;
}
-
+
return TLS_WANT_POLLIN;
}
@@ -1377,7 +1376,7 @@ static ssize_t
write_cb(struct tls *ctx, const void *buf, size_t buflen, void *cb_arg)
{
struct client *c = cb_arg;
-
+
ssize_t ret = write(c->fd, buf, buflen);
if (ret == -1 && errno == EAGAIN)
return TLS_WANT_POLLOUT;