From 9f5b22727d77629e7e4381f2c3b19928dae54adf Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Tue, 3 Dec 2013 10:37:23 +0100 Subject: [PATCH] tests_stub_async look up cmd_line specified name --- src/test/tests_stub_async.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/tests_stub_async.c b/src/test/tests_stub_async.c index d03d5931..5dd4df95 100644 --- a/src/test/tests_stub_async.c +++ b/src/test/tests_stub_async.c @@ -57,7 +57,7 @@ this_callbackfn(struct getdns_context_t *this_context, } int -main() +main(int argc, char** argv) { /* Create the DNS context for this call */ struct getdns_context_t *this_context = NULL; @@ -81,7 +81,7 @@ main() (void) getdns_extension_set_libevent_base(this_context, this_event_base); /* Set up the getdns call */ - const char *this_name = "www.google.com"; + const char *this_name = argc > 1 ? argv[1] : "www.google.com"; char *this_userarg = "somestring"; // Could add things here to help identify this call getdns_transaction_t this_transaction_id = 0;