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:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

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

    r414 r745  
    2727#include "libcli/libcli.h"
    2828#include "param/param.h"
    29 #include "dynconfig/dynconfig.h"
    3029#include "libcli/resolve/resolve.h"
    3130
     
    3534static int hide_unlock_fails;
    3635static int use_oplocks;
    37 static uint_t lock_range = 100;
    38 static uint_t lock_base = 0;
    39 static uint_t min_length = 0;
     36static unsigned int lock_range = 100;
     37static unsigned int lock_base = 0;
     38static unsigned int min_length = 0;
    4039static int exact_error_codes;
    4140static int zero_zero;
     
    120119        struct smbcli_session_options session_options;
    121120
    122         lp_smbcli_options(lp_ctx, &options);
    123         lp_smbcli_session_options(lp_ctx, &session_options);
     121        lpcfg_smbcli_options(lp_ctx, &options);
     122        lpcfg_smbcli_session_options(lp_ctx, &session_options);
    124123
    125124        printf("connect_one(%s, %d, %d)\n", share, snum, conn);
     
    135134                int num_unc_names;
    136135                const char *p;
    137                 p = lp_parm_string(lp_ctx, NULL, "torture", "unclist");
     136                p = lpcfg_parm_string(lp_ctx, NULL, "torture", "unclist");
    138137                if (p) {
    139138                        char *h, *s;
     
    156155
    157156
    158         myname = talloc_asprintf(mem_ctx, "lock-%u-%u", getpid(), snum);
     157        myname = talloc_asprintf(mem_ctx, "lock-%d-%d", (int) getpid(), snum);
    159158        cli_credentials_set_workstation(servers[snum], myname, CRED_SPECIFIED);
    160159
     
    163162                status = smbcli_full_connection(NULL, &c,
    164163                                                server,
    165                                                 lp_smb_ports(lp_ctx),
     164                                                lpcfg_smb_ports(lp_ctx),
    166165                                                share, NULL,
    167                                                 lp_socket_options(lp_ctx),
     166                                                lpcfg_socket_options(lp_ctx),
    168167                                                servers[snum],
    169                                                 lp_resolve_context(lp_ctx),
     168                                                lpcfg_resolve_context(lp_ctx),
    170169                                                ev, &options, &session_options,
    171                                                 lp_iconv_convenience(lp_ctx),
    172                                                 lp_gensec_settings(mem_ctx, lp_ctx));
     170                                                lpcfg_gensec_settings(mem_ctx, lp_ctx));
    173171                if (!NT_STATUS_IS_OK(status)) {
    174172                        sleep(2);
     
    203201                        talloc_free(cli[server][conn]);
    204202                }
    205                 cli[server][conn] = connect_one(ev, lp_ctx, mem_ctx, share[server], 
     203                cli[server][conn] = connect_one(ev, lp_ctx, mem_ctx, share[server],
    206204                                                server, conn);
    207205                if (!cli[server][conn]) {
     
    218216                     struct record *rec)
    219217{
    220         uint_t conn = rec->conn;
    221         uint_t f = rec->f;
     218        unsigned int conn = rec->conn;
     219        unsigned int f = rec->f;
    222220        uint64_t start = rec->start;
    223221        uint64_t len = rec->len;
     
    236234
    237235                        if (!(tree->session->transport->negotiate.capabilities & CAP_LARGE_FILES)) {
    238                                 res=smbcli_lock(tree, fn, start, len, LOCK_TIMEOUT, rec->lock_op);
     236                                res=smbcli_lock(tree, fn, start, len, LOCK_TIMEOUT, (enum brl_type) rec->lock_op);
    239237                        } else {
    240238                                union smb_lock parms;
     
    387385{
    388386        int i;
    389         printf("testing %u ...\n", n);
     387        printf("Testing %u ...\n", n);
    390388        for (i=0; i<n; i++) {
    391389                if (i && i % 100 == 0) {
     
    408406static int test_locks(struct tevent_context *ev,
    409407                      struct loadparm_context *lp_ctx,
    410                           TALLOC_CTX *mem_ctx,
     408                      TALLOC_CTX *mem_ctx,
    411409                      char *share[NSERVERS])
    412410{
     
    428426                        recorded[n].conn = random() % NCONNECTIONS;
    429427                        recorded[n].f = random() % NFILES;
    430                         recorded[n].start = lock_base + ((uint_t)random() % (lock_range-1));
     428                        recorded[n].start = lock_base + ((unsigned int)random() % (lock_range-1));
    431429                        recorded[n].len =  min_length +
    432430                                random() % (lock_range-(recorded[n].start-lock_base));
     
    601599                switch (opt) {
    602600                case OPT_UNCLIST:
    603                         lp_set_cmdline(cmdline_lp_ctx, "torture:unclist", poptGetOptArg(pc));
     601                        lpcfg_set_cmdline(cmdline_lp_ctx, "torture:unclist", poptGetOptArg(pc));
    604602                        break;
    605603                case 'U':
Note: See TracChangeset for help on using the changeset viewer.