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.
This commit is contained in:
Simon Tatham 2020-02-12 21:35:04 +00:00
Родитель f3b2c0f209
Коммит 230c8ef4ee
4 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -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) {

Просмотреть файл

@ -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,

Просмотреть файл

@ -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;

Просмотреть файл

@ -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);