• Home
  • Raw
  • Download

Lines Matching refs:nfds

66   int			nfds,		/* Number of file descriptors */  in httpAddrConnect2()  local
110 nfds = 0; in httpAddrConnect2()
117 while (nfds > 0) in httpAddrConnect2()
119 nfds --; in httpAddrConnect2()
120 httpAddrClose(NULL, fds[nfds]); in httpAddrConnect2()
126 if (addrlist && nfds < (int)(sizeof(fds) / sizeof(fds[0]))) in httpAddrConnect2()
134 if ((fds[nfds] = (int)socket(httpAddrFamily(&(addrlist->addr)), SOCK_STREAM, 0)) < 0) in httpAddrConnect2()
152 setsockopt(fds[nfds], SOL_SOCKET, SO_REUSEADDR, CUPS_SOCAST &val, sizeof(val)); in httpAddrConnect2()
156 setsockopt(fds[nfds], SOL_SOCKET, SO_REUSEPORT, CUPS_SOCAST &val, sizeof(val)); in httpAddrConnect2()
161 setsockopt(fds[nfds], SOL_SOCKET, SO_NOSIGPIPE, CUPS_SOCAST &val, sizeof(val)); in httpAddrConnect2()
170 setsockopt(fds[nfds], IPPROTO_TCP, TCP_NODELAY, CUPS_SOCAST &val, sizeof(val)); in httpAddrConnect2()
177 fcntl(fds[nfds], F_SETFD, FD_CLOEXEC); in httpAddrConnect2()
187 flags = fcntl(fds[nfds], F_GETFL, 0); in httpAddrConnect2()
188 fcntl(fds[nfds], F_SETFL, flags | O_NONBLOCK); in httpAddrConnect2()
195 if (!connect(fds[nfds], &(addrlist->addr.addr), (socklen_t)httpAddrLength(&(addrlist->addr)))) in httpAddrConnect2()
200 fcntl(fds[nfds], F_SETFL, flags); in httpAddrConnect2()
203 *sock = fds[nfds]; in httpAddrConnect2()
205 while (nfds > 0) in httpAddrConnect2()
207 nfds --; in httpAddrConnect2()
208 httpAddrClose(NULL, fds[nfds]); in httpAddrConnect2()
221 httpAddrClose(NULL, fds[nfds]); in httpAddrConnect2()
227 fcntl(fds[nfds], F_SETFL, flags); in httpAddrConnect2()
231 if (fds[nfds] > max_fd) in httpAddrConnect2()
232 max_fd = fds[nfds]; in httpAddrConnect2()
235 addrs[nfds] = addrlist; in httpAddrConnect2()
236 nfds ++; in httpAddrConnect2()
240 if (!addrlist && nfds == 0) in httpAddrConnect2()
260 while (nfds > 0) in httpAddrConnect2()
262 nfds --; in httpAddrConnect2()
263 httpAddrClose(NULL, fds[nfds]); in httpAddrConnect2()
272 for (i = 0; i < nfds; i ++) in httpAddrConnect2()
278 result = poll(pfds, (nfds_t)nfds, addrlist ? 100 : remaining > 250 ? 250 : remaining); in httpAddrConnect2()
284 for (i = 0; i < nfds; i ++) in httpAddrConnect2()
307 for (i = 0; i < nfds; i ++) in httpAddrConnect2()
338 nfds --; in httpAddrConnect2()
339 if (i < nfds) in httpAddrConnect2()
341 memmove(fds + i, fds + i + 1, (size_t)(nfds - i) * (sizeof(fds[0]))); in httpAddrConnect2()
342 memmove(addrs + i, addrs + i + 1, (size_t)(nfds - i) * (sizeof(addrs[0]))); in httpAddrConnect2()
358 for (j ++; j < nfds; j ++) in httpAddrConnect2()
372 while (nfds > 0) in httpAddrConnect2()
374 nfds --; in httpAddrConnect2()
375 httpAddrClose(NULL, fds[nfds]); in httpAddrConnect2()