g_assert(p);
g_assert(ret_cache_flush);
- g_message("consume_record()");
+/* g_message("consume_record()"); */
if (flx_dns_packet_consume_name(p, name, sizeof(name)) < 0 ||
flx_dns_packet_consume_uint16(p, &type) < 0 ||
goto fail;
- g_message("name = %s, rdlength = %u", name, rdlength);
+/* g_message("name = %s, rdlength = %u", name, rdlength); */
start = flx_dns_packet_get_rptr(p);
case FLX_DNS_TYPE_PTR:
case FLX_DNS_TYPE_CNAME:
- g_message("ptr");
+/* g_message("ptr"); */
if (flx_dns_packet_consume_name(p, buf, sizeof(buf)) < 0)
goto fail;
case FLX_DNS_TYPE_SRV:
- g_message("srv");
+/* g_message("srv"); */
if (flx_dns_packet_consume_uint16(p, &r->data.srv.priority) < 0 ||
flx_dns_packet_consume_uint16(p, &r->data.srv.weight) < 0 ||
case FLX_DNS_TYPE_HINFO:
- g_message("hinfo");
+/* g_message("hinfo"); */
if (flx_dns_packet_consume_string(p, buf, sizeof(buf)) < 0)
goto fail;
case FLX_DNS_TYPE_TXT:
- g_message("txt");
+/* g_message("txt"); */
if (rdlength > 0) {
r->data.txt.string_list = flx_string_list_parse(flx_dns_packet_get_rptr(p), rdlength);
if (flx_dns_packet_skip(p, rdlength) < 0)
goto fail;
- }
+ } else
+ r->data.txt.string_list = NULL;
break;
case FLX_DNS_TYPE_A:
- g_message("A");
-
+/* g_message("A"); */
- g_message("%p", flx_dns_packet_get_rptr(p));
-
if (flx_dns_packet_consume_bytes(p, &r->data.a.address, sizeof(flxIPv4Address)) < 0)
goto fail;
-
- g_message("%p", flx_dns_packet_get_rptr(p));
break;
case FLX_DNS_TYPE_AAAA:
- g_message("aaaa");
+/* g_message("aaaa"); */
if (flx_dns_packet_consume_bytes(p, &r->data.aaaa.address, sizeof(flxIPv6Address)) < 0)
goto fail;
default:
- g_message("generic");
+/* g_message("generic"); */
if (rdlength > 0) {
break;
}
- g_message("%i == %u ?", (guint8*) flx_dns_packet_get_rptr(p) - (guint8*) start, rdlength);
+/* g_message("%i == %u ?", (guint8*) flx_dns_packet_get_rptr(p) - (guint8*) start, rdlength); */
/* Check if we read enough data */
if ((guint8*) flx_dns_packet_get_rptr(p) - (guint8*) start != rdlength)
size = flx_string_list_serialize(r->data.txt.string_list, NULL, 0);
- g_message("appending string: %u %p", size, r->data.txt.string_list);
+/* g_message("appending string: %u %p", size, r->data.txt.string_list); */
if (!(data = flx_dns_packet_extend(p, size)))
goto fail;
size = flx_dns_packet_extend(p, 0) - start;
g_assert(size <= 0xFFFF);
- g_message("appended %u", size);
+/* g_message("appended %u", size); */
* (guint16*) l = g_htons((guint16) size);
flx = flx_server_new(NULL);
flx_server_add_text(flx, 0, 0, AF_UNSPEC, FALSE, NULL, "hallo", NULL);
+ flx_server_add_service(flx, 0, 0, AF_UNSPEC, "_http._tcp", "gurke", NULL, NULL, 80, "foo", NULL);
/* k = flx_key_new("ecstasy.local.", FLX_DNS_CLASS_IN, FLX_DNS_TYPE_ANY); */
/* s = flx_subscription_new(flx, k, 0, AF_UNSPEC, subscription, NULL); */
}
static gboolean rdata_equal(const flxRecord *a, const flxRecord *b) {
- gchar *t;
g_assert(a);
g_assert(b);
g_assert(a->key->type == b->key->type);
- t = flx_record_to_string(a);
- g_message("comparing %s", t);
- g_free(t);
+/* t = flx_record_to_string(a); */
+/* g_message("comparing %s", t); */
+/* g_free(t); */
- t = flx_record_to_string(b);
- g_message("and %s", t);
- g_free(t);
+/* t = flx_record_to_string(b); */
+/* g_message("and %s", t); */
+/* g_free(t); */
switch (a->key->type) {