Ignore:
Timestamp:
May 13, 2014, 11:39:04 AM (11 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update trunk to 3.6.23

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/lib/tsocket/tsocket_helpers.c

    r480 r862  
    213213        size_t i;
    214214        struct tevent_req *subreq;
     215        bool optimize = false;
     216        bool save_optimize = false;
     217
     218        if (state->count > 0) {
     219                /*
     220                 * This is not the first time we asked for a vector,
     221                 * which means parts of the pdu already arrived.
     222                 *
     223                 * In this case it make sense to enable
     224                 * a syscall/performance optimization if the
     225                 * low level tstream implementation supports it.
     226                 */
     227                optimize = true;
     228        }
    215229
    216230        TALLOC_FREE(state->vector);
     
    256270        }
    257271
     272        if (optimize) {
     273                /*
     274                 * If the low level stream is a bsd socket
     275                 * we will get syscall optimization.
     276                 *
     277                 * If it is not a bsd socket
     278                 * tstream_bsd_optimize_readv() just returns.
     279                 */
     280                save_optimize = tstream_bsd_optimize_readv(state->caller.stream,
     281                                                           true);
     282        }
    258283        subreq = tstream_readv_send(state,
    259284                                    state->caller.ev,
     
    261286                                    state->vector,
    262287                                    state->count);
     288        if (optimize) {
     289                tstream_bsd_optimize_readv(state->caller.stream,
     290                                           save_optimize);
     291        }
    263292        if (tevent_req_nomem(subreq, req)) {
    264293                return;
Note: See TracChangeset for help on using the changeset viewer.