#endif
static void commSetTcpRcvbuf(int, int);
-fd_debug_t *fdd_table = NULL;
-
bool
isOpen(const int fd)
{
assert(!isOpen(conn->fd)); // NP: global isOpen checks the fde entry for openness not the Comm::Connection
fd_open(conn->fd, FD_SOCKET, note);
- fdd_table[conn->fd].close_file = NULL;
- fdd_table[conn->fd].close_line = 0;
-
fde *F = &fd_table[conn->fd];
F->local_addr = conn->local;
void
_comm_close(int fd, char const *file, int line)
{
- debugs(5, 3, "comm_close: start closing FD " << fd);
+ debugs(5, 3, "start closing FD " << fd << " by " << file << ":" << line);
assert(fd >= 0);
assert(fd < Squid_MaxFD);
fde *F = &fd_table[fd];
- fdd_table[fd].close_file = file;
- fdd_table[fd].close_line = line;
if (F->closing())
return;
comm_init(void)
{
fd_table =(fde *) xcalloc(Squid_MaxFD, sizeof(fde));
- fdd_table = (fd_debug_t *)xcalloc(Squid_MaxFD, sizeof(fd_debug_t));
/* make sure the accept() socket FIFO delay queue exists */
Comm::AcceptLimiter::Instance();
TheHalfClosed = NULL;
safe_free(fd_table);
- safe_free(fdd_table);
Comm::CallbackTableDestruct();
}
assert(!isOpen(new_socket));
fd_open(new_socket, FD_MSGHDR, addr->sun_path);
- fdd_table[new_socket].close_file = NULL;
-
- fdd_table[new_socket].close_line = 0;
-
fd_table[new_socket].sock_family = AI.ai_family;
if (!(flags & COMM_NOCLOEXEC))
// so we end up with a uniform "(HTTP|FTP-data|HTTPS|...) remote-ip:remote-port"
fd_open(sock, FD_SOCKET, "HTTP Request");
- fdd_table[sock].close_file = NULL;
- fdd_table[sock].close_line = 0;
-
fde *F = &fd_table[sock];
details->remote.toStr(F->ipaddr,MAX_IPSTRLEN);
F->remote_port = details->remote.port();
/* misc collection of bits shared by Comm code, but not needed by the rest of Squid. */
-struct _fd_debug_t {
- char const *close_file;
- int close_line;
-};
-
-typedef struct _fd_debug_t fd_debug_t;
-extern fd_debug_t *fdd_table;
-
bool isOpen(const int fd);
void commStopHalfClosedMonitor(int fd);