| 64 | */ |
| 65 | |
| 66 | int /* O - 0 on success, -1 on failure */ |
| 67 | httpAddrClose(http_addr_t *addr, /* I - Listen address or @code NULL@ */ |
| 68 | int fd) /* I - Socket file descriptor */ |
| 69 | { |
| 70 | #ifdef _WIN32 |
| 71 | if (closesocket(fd)) |
| 72 | #else |
| 73 | if (close(fd)) |
| 74 | #endif /* _WIN32 */ |
| 75 | return (-1); |
| 76 | |
| 77 | #ifdef AF_LOCAL |
| 78 | if (addr && addr->addr.sa_family == AF_LOCAL) |
| 79 | return (unlink(addr->un.sun_path)); |
| 80 | #endif /* AF_LOCAL */ |
| 81 | |
| 82 | return (0); |
| 83 | } |
| 84 | |
| 85 | |
| 86 | /* |
no outgoing calls
no test coverage detected