| 1142 | } |
| 1143 | |
| 1144 | void acceptTLSHandler(aeEventLoop *el, int fd, void *privdata, int mask) { |
| 1145 | int cport, cfd, max = MAX_ACCEPTS_PER_CALL; |
| 1146 | char cip[NET_IP_STR_LEN]; |
| 1147 | UNUSED(el); |
| 1148 | UNUSED(mask); |
| 1149 | UNUSED(privdata); |
| 1150 | |
| 1151 | while(max--) { |
| 1152 | cfd = anetTcpAccept(server.neterr, fd, cip, sizeof(cip), &cport); |
| 1153 | if (cfd == ANET_ERR) { |
| 1154 | if (errno != EWOULDBLOCK) |
| 1155 | serverLog(LL_WARNING, |
| 1156 | "Accepting client connection: %s", server.neterr); |
| 1157 | return; |
| 1158 | } |
| 1159 | anetCloexec(cfd); |
| 1160 | serverLog(LL_VERBOSE,"Accepted %s:%d", cip, cport); |
| 1161 | acceptCommonHandler(connCreateAcceptedTLS(cfd, server.tls_auth_clients),0,cip); |
| 1162 | } |
| 1163 | } |
| 1164 | |
| 1165 | void acceptUnixHandler(aeEventLoop *el, int fd, void *privdata, int mask) { |
| 1166 | int cfd, max = MAX_ACCEPTS_PER_CALL; |
nothing calls this directly
no test coverage detected