~ubuntu-branches/ubuntu/maverick/bind9/maverick

« back to all changes in this revision

Viewing changes to bin/tests/system/lwresd/lwtest.c

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones, LaMont Jones, Internet Software Consortium, Inc, localization folks
  • Date: 2008-08-02 14:20:20 UTC
  • mfrom: (1.2.1 upstream) (6.1.24 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080802142020-l1hon9jy8lbbjxmg
[LaMont Jones]

* default to using resolvconf if it is installed
* fix sonames and dependencies.  Closes: #149259, #492418
* Do not build-depend libcap2-dev on non-linux.  Closes: #493392
* drop unused query-loc manpage.  Closes: #492564
* lwresd: Deliver /etc/bind directory.  Closes: #490027
* fix query-source comment in default install

[Internet Software Consortium, Inc]

* 9.5.0-P2.  Closes: #492949

[localization folks]

* l10n: Spanish debconf translation.  Closes: #492425 (Ignacio Mondino)
* l10n: Swedish debconf templates.  Closes: #491369 (Martin Ågren)
* l10n: Japanese debconf translations.  Closes: #492048 (Hideki Yamane
  (Debian-JP))
* l10n: Finnish translation.  Closes: #490630 (Esko Arajärvi)
* l10n: Italian debconf translations.  Closes: #492587 (Alessandro Vietta)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2004  Internet Systems Consortium, Inc. ("ISC")
 
2
 * Copyright (C) 2004, 2007, 2008  Internet Systems Consortium, Inc. ("ISC")
3
3
 * Copyright (C) 2000-2002  Internet Software Consortium.
4
4
 *
5
 
 * Permission to use, copy, modify, and distribute this software for any
 
5
 * Permission to use, copy, modify, and/or distribute this software for any
6
6
 * purpose with or without fee is hereby granted, provided that the above
7
7
 * copyright notice and this permission notice appear in all copies.
8
8
 *
15
15
 * PERFORMANCE OF THIS SOFTWARE.
16
16
 */
17
17
 
18
 
/* $Id: lwtest.c,v 1.22.2.4.2.4 2004/03/08 04:04:37 marka Exp $ */
 
18
/* $Id: lwtest.c,v 1.29.60.2 2008/01/14 23:46:28 tbox Exp $ */
19
19
 
20
20
#include <config.h>
21
21
 
22
22
#include <assert.h>
23
23
#include <stdlib.h>
24
 
#include <string.h>
25
24
 
26
25
#include <isc/net.h>
 
26
#include <isc/string.h>
27
27
 
28
28
#include <lwres/lwres.h>
29
29
#include <lwres/netdb.h>
350
350
                if (hp->h_addrtype != af) {
351
351
                        printf("I:getipnodebyname(%s) returned wrong family\n",
352
352
                               name);
 
353
                        freehostent(hp);
353
354
                        fails++;
354
355
                        return;
355
356
                }
361
362
                                        outbuf, sizeof(outbuf));
362
363
                        printf("I:getipnodebyname(%s) returned %s, "
363
364
                               "expected %s\n", name, outbuf, address);
 
365
                        freehostent(hp);
364
366
                        fails++;
365
367
                        return;
366
368
                }
427
429
                if (name == NULL && error_num == HOST_NOT_FOUND)
428
430
                        return;
429
431
                else if (error_num != HOST_NOT_FOUND) {
430
 
                        printf("I:gethostbyaddr(%s) failed: %d\n",
 
432
                        printf("I:getipnodebyaddr(%s) failed: %d\n",
431
433
                               address, error_num);
432
434
                        fails++;
433
435
                        return;
434
436
                } else {
435
 
                        printf("I:gethostbyaddr(%s) returned not found\n",
 
437
                        printf("I:getipnodebyaddr(%s) returned not found\n",
436
438
                               address);
437
439
                        fails++;
438
440
                        return;
439
441
                }
440
442
        } else {
441
443
                if (strcmp(hp->h_name, name) != 0) {
442
 
                        printf("I:gethostbyname(%s) returned %s, "
 
444
                        printf("I:getipnodebyaddr(%s) returned %s, "
443
445
                               "expected %s\n", address, hp->h_name, name);
 
446
                        freehostent(hp);
444
447
                        fails++;
445
448
                        return;
446
449
                }
588
591
                }
589
592
        } else {
590
593
                if (name == NULL) {
591
 
                        printf("I:getaddrinfo(%s) returned %s, "
 
594
                        printf("I:getnameinfo(%s) returned %s, "
592
595
                               "expected NULL\n", address, host);
593
596
                        fails++;
594
597
                        return;
595
598
                } else if (strcmp(host, name) != 0) {
596
 
                        printf("I:getaddrinfo(%s) returned %s, expected %s\n",
 
599
                        printf("I:getnameinfo(%s) returned %s, expected %s\n",
597
600
                               address, host, name);
598
601
                        fails++;
599
602
                        return;