update to 9.7.1-P2
[tridge/bind9.git] / bin / tests / dst / gsstest.c
index 98e16d265b693681cfcd485c1c089b3c17a187f4..6c314d227c35e14b1ede3cec94adc15256557d2c 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006, 2007  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2006, 2007, 2009  Internet Systems Consortium, Inc. ("ISC")
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -14,7 +14,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: gsstest.c,v 1.6 2007/06/19 23:47:00 tbox Exp $ */
+/* $Id: gsstest.c,v 1.8 2009/09/02 23:48:01 tbox Exp $ */
 
 #include <config.h>
 
@@ -175,7 +175,7 @@ recvresponse(isc_task_t *task, isc_event_t *event) {
 end:
        if (query)
                dns_message_destroy(&query);
-       
+
        if (reqev->request)
                dns_request_destroy(&reqev->request);
 
@@ -184,7 +184,7 @@ end:
        event = isc_event_allocate(mctx, (void *)1, 1, console, NULL,
                                   sizeof(*event));
        isc_task_send(task, &event);
-       return;         
+       return;
 }
 
 
@@ -202,7 +202,7 @@ sendquery(isc_task_t *task, isc_event_t *event)
        char output[10 * 1024];
 
        static char host[256];
-       
+
        isc_event_free(&event);
 
        printf("Query => ");
@@ -212,7 +212,7 @@ sendquery(isc_task_t *task, isc_event_t *event)
        isc_buffer_init(&buf, host, strlen(host));
        isc_buffer_add(&buf, strlen(host));
        result = dns_name_fromtext(dns_fixedname_name(&queryname), &buf,
-                                  dns_rootname, ISC_FALSE, NULL);
+                                  dns_rootname, 0, NULL);
        CHECK("dns_name_fromtext", result);
 
        result = dns_message_create(mctx, DNS_MESSAGE_INTENTRENDER, &message);
@@ -335,7 +335,7 @@ end:
                dns_request_destroy(&reqev->request);
 
        isc_event_free(&event);
-       
+
        event = isc_event_allocate(mctx, (void *)1, 1, console, NULL,
                                   sizeof(*event));
        isc_task_send(task, &event);
@@ -357,27 +357,27 @@ initctx1(isc_task_t *task, isc_event_t *event) {
        sprintf(contextname, "gsstest.context.%d.", (int)time(NULL));
 
        printf("Initctx - context name we're using: %s\n", contextname);
-       
+
        printf("Negotiating GSSAPI context: ");
        printf(gssid);
        printf("\n");
 
        /*
         * Setup a GSSAPI context with the server
-        */ 
+        */
        dns_fixedname_init(&servername);
        isc_buffer_init(&buf, contextname, strlen(contextname));
        isc_buffer_add(&buf, strlen(contextname));
        result = dns_name_fromtext(dns_fixedname_name(&servername), &buf,
-                                  dns_rootname, ISC_FALSE, NULL);
+                                  dns_rootname, 0, NULL);
        CHECK("dns_name_fromtext", result);
 
-       /* Make name happen */  
+       /* Make name happen */
        dns_fixedname_init(&gssname);
        isc_buffer_init(&buf, gssid, strlen(gssid));
        isc_buffer_add(&buf, strlen(gssid));
        result = dns_name_fromtext(dns_fixedname_name(&gssname), &buf,
-                                  dns_rootname, ISC_FALSE, NULL);
+                                  dns_rootname, 0, NULL);
        CHECK("dns_name_fromtext", result);
 
        query = NULL;
@@ -423,7 +423,7 @@ setup(void)
                        isc_sockaddr_fromin(&address, &inaddr, PORT);
                        return;
                }
-       
+
        };
 }
 
@@ -446,7 +446,7 @@ main(int argc, char *argv[]) {
 
        UNUSED(argv);
        UNUSED(argc);
-       
+
        RUNCHECK(isc_app_start());
 
        dns_result_register();
@@ -519,7 +519,7 @@ main(int argc, char *argv[]) {
                                   &sock));
 
        setup();
-       
+
        RUNCHECK(isc_app_onrun(mctx, task, console, NULL));
 
        (void)isc_app_run();
@@ -529,10 +529,10 @@ main(int argc, char *argv[]) {
 
        dns_requestmgr_shutdown(requestmgr);
        dns_requestmgr_detach(&requestmgr);
-       
+
        dns_dispatch_detach(&dispatchv4);
        dns_dispatchmgr_destroy(&dispatchmgr);
-       
+
        isc_timermgr_destroy(&timermgr);
 
        isc_task_detach(&task);