Ignore:
Timestamp:
Nov 12, 2012, 5:38:52 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server 3.5: update branche to 3.5.16

Location:
branches/samba-3.5.x/source3/libads
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.5.x/source3/libads/ads_status.c

    r414 r736  
    8080                        return NT_STATUS_OK;
    8181                }
     82                if (status.err.rc == LDAP_TIMELIMIT_EXCEEDED) {
     83                        return NT_STATUS_IO_TIMEOUT;
     84                }
    8285                return NT_STATUS_LDAP(status.err.rc);
    8386#endif
  • branches/samba-3.5.x/source3/libads/ads_struct.c

    r414 r736  
    149149        ads->auth.flags = wrap_flags;
    150150
     151        /* Start with a page size of 1000 when the connection is new,
     152         * we will drop it by half we get a timeout.   */
     153        ads->config.ldap_page_size     = 1000;
     154
    151155        return ads;
    152156}
  • branches/samba-3.5.x/source3/libads/ldap.c

    r583 r736  
    925925        cookie_be = ber_alloc_t(LBER_USE_DER);
    926926        if (*cookie) {
    927                 ber_printf(cookie_be, "{iO}", (ber_int_t) 1000, *cookie);
     927                ber_printf(cookie_be, "{iO}", (ber_int_t) ads->config.ldap_page_size, *cookie);
    928928                ber_bvfree(*cookie); /* don't need it from last time */
    929929                *cookie = NULL;
    930930        } else {
    931                 ber_printf(cookie_be, "{io}", (ber_int_t) 1000, "", 0);
     931                ber_printf(cookie_be, "{io}", (ber_int_t) ads->config.ldap_page_size, "", 0);
    932932        }
    933933        ber_flatten(cookie_be, &cookie_bv);
  • branches/samba-3.5.x/source3/libads/ldap_utils.c

    r414 r736  
    6969        while (--count) {
    7070
     71                if (NT_STATUS_EQUAL(ads_ntstatus(status), NT_STATUS_IO_TIMEOUT) && ads->config.ldap_page_size >= 250) {
     72                        int new_page_size = (ads->config.ldap_page_size / 2);
     73                        DEBUG(1, ("Reducing LDAP page size from %d to %d due to IO_TIMEOUT\n",
     74                                  ads->config.ldap_page_size, new_page_size));
     75                        ads->config.ldap_page_size = new_page_size;
     76                }
     77
    7178                if (*res)
    7279                        ads_msgfree(ads, *res);
Note: See TracChangeset for help on using the changeset viewer.