summaryrefslogtreecommitdiff
path: root/crawler.c
diff options
context:
space:
mode:
authorTharanga Gamaethige <tgamaethige@netflix.com>2018-11-30 17:44:33 -0800
committerdormando <dormando@rydia.net>2019-04-15 21:36:18 -0700
commitee1cfe3bf9384d1a93545fc942e25bed6437d910 (patch)
tree2e880ddd3d263b85f2cf6de73b8eb15d14d02e37 /crawler.c
parentd2dcfff7edd28baf3587ab103d6fbac322335a68 (diff)
downloadmemcached-ee1cfe3bf9384d1a93545fc942e25bed6437d910.tar.gz
Basic implementation of TLS for memcached.1.5.13
Most of the work done by Tharanga. Some commits squashed in by dormando. Also reviewed by dormando. Tested, working, but experimental implementation of TLS for memcached. Enable with ./configure --enable-tls Requires OpenSSL 1.1.0 or better. See `memcached -h` output for usage.
Diffstat (limited to 'crawler.c')
-rw-r--r--crawler.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawler.c b/crawler.c
index a1a5ead..e30d09b 100644
--- a/crawler.c
+++ b/crawler.c
@@ -293,7 +293,7 @@ static int lru_crawler_poll(crawler_client_t *c) {
if (to_poll[0].revents & POLLIN) {
char buf[1];
- int res = read(c->sfd, buf, 1);
+ int res = ((conn*)c->c)->read(c->c, buf, 1);
if (res == 0 || (res == -1 && (errno != EAGAIN && errno != EWOULDBLOCK))) {
lru_crawler_close_client(c);
return -1;
@@ -304,7 +304,7 @@ static int lru_crawler_poll(crawler_client_t *c) {
lru_crawler_close_client(c);
return -1;
} else if (to_poll[0].revents & POLLOUT) {
- int total = write(c->sfd, data, data_size);
+ int total = ((conn*)c->c)->write(c->c, data, data_size);
if (total == -1) {
if (errno != EAGAIN && errno != EWOULDBLOCK) {
lru_crawler_close_client(c);