/*
- * $Id: rfc1035.c,v 1.53 2008/01/11 03:49:21 amosjeffries Exp $
+ * $Id: rfc1035.c,v 1.54 2008/01/19 07:11:34 amosjeffries Exp $
*
* Low level DNS protocol routines
* AUTHOR: Duane Wessels
}
RR->rdlength = rdlength;
switch (RR->type) {
+#if DNS_CNAME
case RFC1035_TYPE_CNAME:
+#endif
case RFC1035_TYPE_PTR:
RR->rdata = (char*)xmalloc(RFC1035_MAXHOSTNAMESZ);
rdata_off = *off;
/*
- * $Id: cache_cf.cc,v 1.536 2008/01/18 12:37:08 amosjeffries Exp $
+ * $Id: cache_cf.cc,v 1.537 2008/01/19 07:11:34 amosjeffries Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
char* file = strtok_r(files, w_space, &saveptr);
while (file != NULL) {
error_count += parseOneConfigFile(file, depth);
- file = strtok_r(files, w_space, &saveptr);
+ file = strtok_r(NULL, w_space, &saveptr);
}
return error_count;
}
/*
- * $Id: comm.cc,v 1.441 2008/01/07 17:12:28 hno Exp $
+ * $Id: comm.cc,v 1.442 2008/01/19 07:11:35 amosjeffries Exp $
*
* DEBUG: section 5 Socket Functions
* AUTHOR: Harvest Derived
details.peer = *gai;
+ details.me.InitAddrInfo(gai);
+
details.me.SetEmpty();
getsockname(sock, gai->ai_addr, &gai->ai_addrlen);
details.me = *gai;
details.peer.NtoA(F->ipaddr,MAX_IPSTRLEN);
F->remote_port = details.peer.GetPort();
F->local_addr.SetPort(details.me.GetPort());
- F->sock_family = gai->ai_family;
+#if USE_IPV6
+ F->sock_family = AF_INET;
+#else
+ F->sock_family = details.me.IsIPv4()?AF_INET:AF_INET6;
+#endif
+ details.me.FreeAddrInfo(gai);
commSetNonBlocking(sock);
- details.me.FreeAddrInfo(gai);
-
PROF_stop(comm_accept);
return sock;
}
return;
}
- debugs(5, 5, "fdc_t::acceptOne accepted: FD " << fd << " handler: " << (void*)accept.accept.callback.handler << " newfd: " << newfd);
+ debugs(5, 5, HERE << "accepted: FD " << fd << " handler: " << (void*)accept.accept.callback.handler << " newfd: " << newfd << " from: " << accept.connDetails.peer);
assert(accept.accept.callback.handler);
+
accept.accept.doCallback(fd, newfd, COMM_OK, 0, &accept.connDetails);
/* If we weren't re-registed, don't bother trying again! */