From 5f0cf43db37bb3037195787c6d12c9389d15e14b Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 22 Feb 2016 17:51:33 +1100 Subject: [PATCH] Fix inappropriate setting of proxy bool in trusted mode --- src/ckpool.c | 8 ++++---- src/connector.c | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/ckpool.c b/src/ckpool.c index b4456d96..f064a067 100644 --- a/src/ckpool.c +++ b/src/ckpool.c @@ -601,7 +601,7 @@ static int recv_available(ckpool_t *ckp, connsock_t *cs) int read_socket_line(connsock_t *cs, float *timeout) { ckpool_t *ckp = cs->ckp; - bool proxy = ckp->proxy; + bool quiet = ckp->proxy | ckp->remote; char *eom = NULL; tv_t start, now; float diff; @@ -620,7 +620,7 @@ int read_socket_line(connsock_t *cs, float *timeout) } if (*timeout < 0) { - if (proxy) + if (quiet) LOGINFO("Timed out in read_socket_line"); else LOGERR("Timed out in read_socket_line"); @@ -629,7 +629,7 @@ int read_socket_line(connsock_t *cs, float *timeout) } ret = wait_read_select(cs->fd, *timeout); if (ret < 1) { - if (proxy) + if (quiet) LOGINFO("Select %s in read_socket_line", !ret ? "timed out" : "failed"); else LOGERR("Select %s in read_socket_line", !ret ? "timed out" : "failed"); @@ -640,7 +640,7 @@ int read_socket_line(connsock_t *cs, float *timeout) /* If we have done wait_read_select there should be * something to read and if we get nothing it means the * socket is closed. */ - if (proxy) + if (quiet) LOGINFO("Failed to recv in read_socket_line"); else LOGERR("Failed to recv in read_socket_line"); diff --git a/src/connector.c b/src/connector.c index c980160f..627977b8 100644 --- a/src/connector.c +++ b/src/connector.c @@ -1132,8 +1132,6 @@ static void *urecv_process(void *arg) connsock_t *cs = &cdata->upstream_cs; bool alive = true; - ckp->proxy = true; - rename_proc("ureceiver"); pthread_detach(pthread_self());