Ignore:
Timestamp:
Nov 27, 2012, 4:43:17 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.0

Location:
trunk/server
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source4/torture/nbench/nbench.c

    r414 r745  
    6464        bool correct = true;
    6565        double target_rate = torture_setting_double(tctx, "targetrate", 0);     
    66         int n;
     66        int n = 0;
    6767
    6868        if (target_rate != 0 && client == 0) {
     
    100100                }
    101101
    102                 all_string_sub(line,"client1", cname, sizeof(line));
     102                all_string_sub(line, "client1", cname, sizeof(line));
    103103               
    104                 params = params0 = str_list_make_shell(NULL, line, " ");
     104                params = params0 = const_str_list(
     105                                        str_list_make_shell(NULL, line, " "));
    105106                i = str_list_length(params);
    106107
     
    282283NTSTATUS torture_nbench_init(void)
    283284{
    284         struct torture_suite *suite =
    285                 torture_suite_create(
    286                         talloc_autofree_context(),
    287                         "BENCH");
    288 
    289         torture_suite_add_simple_test(suite, "NBENCH", torture_nbench);
     285        struct torture_suite *suite = torture_suite_create(
     286                                                   talloc_autofree_context(), "bench");
     287
     288        torture_suite_add_simple_test(suite, "nbench", torture_nbench);
    290289
    291290        suite->description = talloc_strdup(suite, "Benchmarks");
  • trunk/server/source4/torture/nbench/nbio.c

    r414 r745  
    2828#include "../lib/util/dlinklist.h"
    2929#include "libcli/libcli.h"
    30 #include "libcli/raw/libcliraw.h"
    31 #include "torture/torture.h"
    32 #include "libcli/libcli.h"
    3330#include "torture/util.h"
    3431#include "torture/nbench/proto.h"
     
    5047struct createx_params {
    5148        char *fname;
    52         uint_t create_options;
    53         uint_t create_disposition;
     49        unsigned int create_options;
     50        unsigned int create_disposition;
    5451        int handle;
    5552};
     
    7673static bool nb_do_createx(struct ftable *f,
    7774                          const char *fname,
    78                           uint_t create_options,
    79                           uint_t create_disposition,
     75                          unsigned int create_options,
     76                          unsigned int create_disposition,
    8077                          int handle,
    8178                          NTSTATUS status,
     
    8683static void nb_set_createx_params(struct ftable *f,
    8784                                  const char *fname,
    88                                   uint_t create_options,
    89                                   uint_t create_disposition,
     85                                  unsigned int create_options,
     86                                  unsigned int create_disposition,
    9087                                  int handle)
    9188{
     
    196193        tdelay = (children[nbio_id].bytes - last_bytes)/(1.0e6*rate) - timeval_elapsed(&last_time);
    197194        if (tdelay > 0) {
    198                 msleep(tdelay*1000);
     195                smb_msleep(tdelay*1000);
    199196        } else {
    200197                children[nbio_id].max_latency = MAX(children[nbio_id].max_latency, -tdelay);
     
    214211        double elapsed = timeval_elapsed(&children[nbio_id].starttime);
    215212        if (targett > elapsed) {
    216                 msleep(1000*(targett - elapsed));
     213                smb_msleep(1000*(targett - elapsed));
    217214        } else if (elapsed - targett > children[nbio_id].max_latency) {
    218215                children[nbio_id].max_latency = MAX(elapsed - targett, children[nbio_id].max_latency);
     
    459456static bool nb_do_createx(struct ftable *f,
    460457                          const char *fname,
    461                           uint_t create_options,
    462                           uint_t create_disposition,
     458                          unsigned int create_options,
     459                          unsigned int create_disposition,
    463460                          int handle,
    464461                          NTSTATUS status,
     
    469466        NTSTATUS ret;
    470467        TALLOC_CTX *mem_ctx;
    471         uint_t flags = 0;
     468        unsigned int flags = 0;
    472469
    473470        mem_ctx = talloc_init("raw_open");
     
    488485        io.ntcreatex.level = RAW_OPEN_NTCREATEX;
    489486        io.ntcreatex.in.flags = flags;
    490         io.ntcreatex.in.root_fid = 0;
     487        io.ntcreatex.in.root_fid.fnum = 0;
    491488        io.ntcreatex.in.access_mask = desired_access;
    492489        io.ntcreatex.in.file_attr = 0;
     
    535532
    536533bool nb_createx(const char *fname,
    537                uint_t create_options, uint_t create_disposition, int handle,
     534               unsigned int create_options, unsigned int create_disposition, int handle,
    538535               NTSTATUS status)
    539536{
     
    668665}
    669666
    670 bool nb_unlockx(int handle, uint_t offset, int size, NTSTATUS status)
     667bool nb_unlockx(int handle, unsigned int offset, int size, NTSTATUS status)
    671668{
    672669        union smb_lock io;
Note: See TracChangeset for help on using the changeset viewer.