/*
- * $Id: rfc1035.c,v 1.37 2005/05/06 21:54:50 wessels Exp $
+ * $Id: rfc1035.c,v 1.38 2005/05/09 01:58:34 hno Exp $
*
* Low level DNS protocol routines
* AUTHOR: Duane Wessels
size_t offset = 0;
size_t sz = *szp;
memset(&h, '\0', sizeof(h));
- /* the first char of hostname must be alphanmeric */
- if (NULL == strchr(Alphanum, *hostname)) {
- rfc1035SetErrno(3);
- return 0;
- }
h.id = rfc1035Qid();
h.qr = 0;
h.rd = 1;
/*
- * $Id: dns_internal.cc,v 1.68 2005/05/09 01:36:55 hno Exp $
+ * $Id: dns_internal.cc,v 1.69 2005/05/09 01:58:34 hno Exp $
*
* DEBUG: section 78 DNS lookups; interacts with lib/rfc1035.c
* AUTHOR: Duane Wessels
q->id = rfc1035BuildAQuery(name, q->buf, &q->sz);
- if (0 == q->id) {
- /* problem with query data -- query not sent */
- callback(data, NULL, 0, "Internal error");
- memFree(q, MEM_IDNS_QUERY);
- return;
- }
-
debug(78, 3) ("idnsALookup: buf is %d bytes for %s, id = %#hx\n",
(int) q->sz, name, q->id);
+
q->callback = callback;
+
q->callback_data = cbdataReference(data);
+
q->start_t = current_time;
+
idnsCacheQuery(q, name);
+
idnsSendQuery(q);
}