mirror of
https://github.com/omar-polo/gmid.git
synced 2024-09-07 20:09:20 +02:00
proxy: inline the `goto retry'
This commit is contained in:
parent
7249505e35
commit
55ae6c66b2
14
proxy.c
14
proxy.c
@ -55,7 +55,8 @@ proxy_tls_readcb(int fd, short event, void *d)
|
||||
switch (ret = tls_read(c->proxyctx, buf, howmuch)) {
|
||||
case TLS_WANT_POLLIN:
|
||||
case TLS_WANT_POLLOUT:
|
||||
goto retry;
|
||||
event_add(&bufev->ev_read, NULL);
|
||||
return;
|
||||
case -1:
|
||||
what |= EVBUFFER_ERROR;
|
||||
goto err;
|
||||
@ -83,10 +84,6 @@ proxy_tls_readcb(int fd, short event, void *d)
|
||||
(*bufev->readcb)(bufev, bufev->cbarg);
|
||||
return;
|
||||
|
||||
retry:
|
||||
event_add(&bufev->ev_read, NULL);
|
||||
return;
|
||||
|
||||
err:
|
||||
(*bufev->errorcb)(bufev, what, bufev->cbarg);
|
||||
}
|
||||
@ -111,7 +108,8 @@ proxy_tls_writecb(int fd, short event, void *d)
|
||||
switch (ret) {
|
||||
case TLS_WANT_POLLIN:
|
||||
case TLS_WANT_POLLOUT:
|
||||
goto retry;
|
||||
event_add(&bufev->ev_write, NULL);
|
||||
return;
|
||||
case -1:
|
||||
what |= EVBUFFER_ERROR;
|
||||
goto err;
|
||||
@ -129,10 +127,6 @@ proxy_tls_writecb(int fd, short event, void *d)
|
||||
(*bufev->writecb)(bufev, bufev->cbarg);
|
||||
return;
|
||||
|
||||
retry:
|
||||
event_add(&bufev->ev_write, NULL);
|
||||
return;
|
||||
|
||||
err:
|
||||
(*bufev->errorcb)(bufev, what, bufev->cbarg);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user