From 230c8ef4ee6091d9686f12707abbea964a701c69 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Wed, 12 Feb 2020 21:35:04 +0000 Subject: [PATCH] Use 'true' and 'false' in sk_set_frozen calls. Apparently a handful of calls to that particular function managed to miss my big-bang conversion to using bool where appropriate, and were still being called with constants 0 and 1. --- pageant.c | 2 +- portfwd.c | 6 +++--- proxy.c | 4 ++-- sshshare.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pageant.c b/pageant.c index 9551d54a..626f4bbd 100644 --- a/pageant.c +++ b/pageant.c @@ -1492,7 +1492,7 @@ static int pageant_listen_accepting(Plug *plug, return 1; } - sk_set_frozen(pc->connsock, 0); + sk_set_frozen(pc->connsock, false); peerinfo = sk_peer_info(pc->connsock); if (peerinfo && peerinfo->log_text) { diff --git a/portfwd.c b/portfwd.c index f10cc8d1..d0c4a50e 100644 --- a/portfwd.c +++ b/portfwd.c @@ -408,7 +408,7 @@ static void pfd_receive(Plug *plug, int urgent, const char *data, size_t len) * Freeze the socket until the SSH server confirms the * connection. */ - sk_set_frozen(pf->s, 1); + sk_set_frozen(pf->s, true); pf->c = wrap_lportfwd_open(pf->cl, pf->hostname, pf->port, pf->s, &pf->chan); @@ -538,7 +538,7 @@ static int pfl_accepting(Plug *p, accept_fn_t constructor, accept_ctx_t ctx) pf->socksbuf = strbuf_new(); pf->socksbuf_consumed = 0; pf->port = 0; /* "hostname" buffer is so far empty */ - sk_set_frozen(s, 0); /* we want to receive SOCKS _now_! */ + sk_set_frozen(s, false); /* we want to receive SOCKS _now_! */ } else { pf->hostname = dupstr(pl->hostname); pf->port = pl->port; @@ -666,7 +666,7 @@ static void pfd_open_confirmation(Channel *chan) PortForwarding *pf = container_of(chan, PortForwarding, chan); pf->ready = true; - sk_set_frozen(pf->s, 0); + sk_set_frozen(pf->s, false); sk_write(pf->s, NULL, 0); if (pf->socksbuf) { sshfwd_write(pf->c, pf->socksbuf->u + pf->socksbuf_consumed, diff --git a/proxy.c b/proxy.c index 772f4e04..7f346c06 100644 --- a/proxy.c +++ b/proxy.c @@ -65,7 +65,7 @@ void proxy_activate (ProxySocket *p) * unfreezing the actual underlying socket. */ if (!p->freeze) - sk_set_frozen(&p->sock, 0); + sk_set_frozen(&p->sock, false); } /* basic proxy socket functions */ @@ -499,7 +499,7 @@ Socket *new_connection(SockAddr *addr, const char *hostname, return &ret->sock; /* start the proxy negotiation process... */ - sk_set_frozen(ret->sub_socket, 0); + sk_set_frozen(ret->sub_socket, false); ret->negotiate(ret, PROXY_CHANGE_NEW); return &ret->sock; diff --git a/sshshare.c b/sshshare.c index 573114cd..92d2dcf5 100644 --- a/sshshare.c +++ b/sshshare.c @@ -1940,7 +1940,7 @@ static int share_listen_accepting(Plug *plug, return err != NULL; } - sk_set_frozen(cs->sock, 0); + sk_set_frozen(cs->sock, false); add234(cs->parent->connections, cs);