Author: gd
Date: 2007-01-17 19:14:34 +0000 (Wed, 17 Jan 2007)
New Revision: 20861

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20861

Log:
We only use sitespecific DNS lookups when looking for DCs or KDCs, not
for a PDC.

Guenther

Modified:
   branches/SAMBA_3_0/source/libsmb/namequery.c
   branches/SAMBA_3_0_24/source/libsmb/namequery.c


Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/namequery.c
===================================================================
--- branches/SAMBA_3_0/source/libsmb/namequery.c        2007-01-17 19:11:45 UTC 
(rev 20860)
+++ branches/SAMBA_3_0/source/libsmb/namequery.c        2007-01-17 19:14:34 UTC 
(rev 20861)
@@ -1379,19 +1379,15 @@
 
 BOOL get_pdc_ip(const char *domain, struct in_addr *ip)
 {
-       char *sitename = sitename_fetch();
        struct ip_service *ip_list = NULL;
        int count = 0;
 
        /* Look up #1B name */
 
-       if (!internal_resolve_name(domain, 0x1b, sitename, &ip_list, &count, 
lp_name_resolve_order())) {
-               SAFE_FREE(sitename);
+       if (!internal_resolve_name(domain, 0x1b, NULL, &ip_list, &count, 
lp_name_resolve_order())) {
                return False;
        }
 
-       SAFE_FREE(sitename);
-
        /* if we get more than 1 IP back we have to assume it is a
           multi-homed PDC and not a mess up */
 

Modified: branches/SAMBA_3_0_24/source/libsmb/namequery.c
===================================================================
--- branches/SAMBA_3_0_24/source/libsmb/namequery.c     2007-01-17 19:11:45 UTC 
(rev 20860)
+++ branches/SAMBA_3_0_24/source/libsmb/namequery.c     2007-01-17 19:14:34 UTC 
(rev 20861)
@@ -1379,19 +1379,15 @@
 
 BOOL get_pdc_ip(const char *domain, struct in_addr *ip)
 {
-       char *sitename = sitename_fetch();
        struct ip_service *ip_list = NULL;
        int count = 0;
 
        /* Look up #1B name */
 
-       if (!internal_resolve_name(domain, 0x1b, sitename, &ip_list, &count, 
lp_name_resolve_order())) {
-               SAFE_FREE(sitename);
+       if (!internal_resolve_name(domain, 0x1b, NULL, &ip_list, &count, 
lp_name_resolve_order())) {
                return False;
        }
 
-       SAFE_FREE(sitename);
-
        /* if we get more than 1 IP back we have to assume it is a
           multi-homed PDC and not a mess up */
 

Reply via email to