Changeset 140 for branches/samba-3.0/source/libsmb/namequery.c
- Timestamp:
- Jul 11, 2008, 1:13:42 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.0/source/libsmb/namequery.c
r1 r140 1429 1429 BOOL done_auto_lookup = False; 1430 1430 int auto_count = 0; 1431 NTSTATUS status; 1432 1433 *ip_list = NULL; 1434 *count = 0; 1431 1435 1432 1436 *ordered = False; … … 1481 1485 if (internal_resolve_name(domain, 0x1C, sitename, ip_list, count, 1482 1486 resolve_order)) { 1483 return NT_STATUS_OK; 1487 status = NT_STATUS_OK; 1488 goto out; 1484 1489 } else { 1485 return NT_STATUS_NO_LOGON_SERVERS; 1490 status = NT_STATUS_NO_LOGON_SERVERS; 1491 goto out; 1486 1492 } 1487 1493 } … … 1498 1504 p = pserver; 1499 1505 while (next_token(&p,name,LIST_SEP,sizeof(name))) { 1500 if ( strequal(name, "*")) {1506 if (!done_auto_lookup && strequal(name, "*")) { 1501 1507 if (internal_resolve_name(domain, 0x1C, sitename, &auto_ip_list, 1502 1508 &auto_count, resolve_order)) … … 1515 1521 if ( done_auto_lookup ) { 1516 1522 DEBUG(4,("get_dc_list: no servers found\n")); 1517 SAFE_FREE(auto_ip_list);1518 return NT_STATUS_NO_LOGON_SERVERS;1523 status = NT_STATUS_NO_LOGON_SERVERS; 1524 goto out; 1519 1525 } 1520 1526 if (internal_resolve_name(domain, 0x1C, sitename, ip_list, count, 1521 1527 resolve_order)) { 1522 return NT_STATUS_OK; 1528 status = NT_STATUS_OK; 1529 goto out; 1523 1530 } else { 1524 return NT_STATUS_NO_LOGON_SERVERS; 1531 status = NT_STATUS_NO_LOGON_SERVERS; 1532 goto out; 1525 1533 } 1526 1534 } … … 1528 1536 if ( (return_iplist = SMB_MALLOC_ARRAY(struct ip_service, num_addresses)) == NULL ) { 1529 1537 DEBUG(3,("get_dc_list: malloc fail !\n")); 1530 SAFE_FREE(auto_ip_list);1531 return NT_STATUS_NO_MEMORY;1538 status = NT_STATUS_NO_MEMORY; 1539 goto out; 1532 1540 } 1533 1541 … … 1586 1594 } 1587 1595 1588 SAFE_FREE(auto_ip_list);1589 1590 1596 /* need to remove duplicates in the list if we have any 1591 1597 explicit password servers */ … … 1607 1613 *count = local_count; 1608 1614 1609 return ( *count != 0 ? NT_STATUS_OK : NT_STATUS_NO_LOGON_SERVERS ); 1615 status = ( *count != 0 ? NT_STATUS_OK : NT_STATUS_NO_LOGON_SERVERS ); 1616 1617 out: 1618 1619 if (!NT_STATUS_IS_OK(status)) { 1620 SAFE_FREE(return_iplist); 1621 *ip_list = NULL; 1622 *count = 0; 1623 } 1624 1625 SAFE_FREE(auto_ip_list); 1626 1627 return status; 1610 1628 } 1611 1629
Note:
See TracChangeset
for help on using the changeset viewer.