Ignore:
Timestamp:
May 27, 2009, 9:09:42 AM (17 years ago)
Author:
Herwig Bauernfeind
Message:

Update 3.2 branch to 3.2.8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.2.x/source/libsmb/dsgetdcname.c

    r228 r232  
    13841384}
    13851385
     1386
     1387
     1388
     1389
     1390
     1391
     1392
     1393
     1394
     1395
     1396
     1397
     1398
     1399
     1400
     1401
     1402
     1403
     1404
     1405
     1406
    13861407/********************************************************************
    13871408 dsgetdcname.
     
    14011422        struct netr_DsRGetDCNameInfo *myinfo = NULL;
    14021423        char *query_site = NULL;
     1424
     1425
    14031426
    14041427        DEBUG(10,("dsgetdcname: domain_name: %s, "
     
    14281451                                    flags, query_site, &myinfo);
    14291452        if (NT_STATUS_IS_OK(status)) {
    1430                 *info = myinfo;
    14311453                goto done;
    14321454        }
     
    14411463                                        &myinfo);
    14421464
    1443         if (NT_STATUS_IS_OK(status)) {
    1444                 *info = myinfo;
    1445         }
    1446 
    14471465 done:
    14481466        SAFE_FREE(query_site);
    14491467
    1450         return status;
    1451 }
     1468        if (!NT_STATUS_IS_OK(status)) {
     1469                if (!first) {
     1470                        *info = first_info;
     1471                        return NT_STATUS_OK;
     1472                }
     1473                return status;
     1474        }
     1475
     1476        if (!first) {
     1477                TALLOC_FREE(first_info);
     1478        } else if (!is_closest_site(myinfo)) {
     1479                first = false;
     1480                first_info = myinfo;
     1481                /* TODO: may use the next_closest_site here */
     1482                query_site = SMB_STRDUP(myinfo->client_site_name);
     1483                goto rediscover;
     1484        }
     1485
     1486        *info = myinfo;
     1487        return NT_STATUS_OK;
     1488}
Note: See TracChangeset for help on using the changeset viewer.