diff options
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -14,16 +14,23 @@ static gboolean send_timeout(gpointer data) { flxServer *flx = data; flxKey *k; - flx_server_dump(flx, stdout); - + /* k = flx_key_new("cocaine.local.", FLX_DNS_CLASS_IN, FLX_DNS_TYPE_A); */ +/* flx_server_post_query(flx, 0, AF_UNSPEC, k); */ +/* flx_key_unref(k); */ - k = flx_key_new("cocaine.local.", FLX_DNS_CLASS_IN, FLX_DNS_TYPE_A); - flx_server_send_query(flx, 0, AF_UNSPEC, k); + k = flx_key_new("ecstasy.local.", FLX_DNS_CLASS_IN, FLX_DNS_TYPE_A); + flx_server_post_query(flx, 0, AF_INET, k); flx_key_unref(k); return FALSE; } +static gboolean dump_timeout(gpointer data) { + flxServer *flx = data; + flx_server_dump(flx, stdout); + return TRUE; +} + int main(int argc, char *argv[]) { flxServer *flx; gchar *r; @@ -35,8 +42,9 @@ int main(int argc, char *argv[]) { loop = g_main_loop_new(NULL, FALSE); - /*g_timeout_add(1000*5, quit_timeout, loop);*/ + g_timeout_add(1000*60, quit_timeout, loop); g_timeout_add(1000, send_timeout, flx); + g_timeout_add(1000*10, dump_timeout, flx); g_main_loop_run(loop); |