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/source3/torture/msgtest.c

    r414 r745  
    22   Unix SMB/CIFS implementation.
    33   Copyright (C) Andrew Tridgell 2000
    4    
     4
    55   This program is free software; you can redistribute it and/or modify
    66   it under the terms of the GNU General Public License as published by
    77   the Free Software Foundation; either version 3 of the License, or
    88   (at your option) any later version.
    9    
     9
    1010   This program is distributed in the hope that it will be useful,
    1111   but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313   GNU General Public License for more details.
    14    
     14
    1515   You should have received a copy of the GNU General Public License
    1616   along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2222
    2323#include "includes.h"
     24#include "messages.h"
    2425
    2526static int pong_count;
     
    4950        load_case_tables();
    5051
    51         setup_logging(argv[0],True);
    52        
     52        setup_logging(argv[0], DEBUG_STDOUT);
     53
    5354        lp_load(get_dyn_CONFIGFILE(),False,False,False,True);
    5455
    5556        if (!(evt_ctx = tevent_context_init(NULL)) ||
    56             !(msg_ctx = messaging_init(NULL, server_id_self(), evt_ctx))) {
     57            !(msg_ctx = messaging_init(NULL, procid_self(), evt_ctx))) {
    5758                fprintf(stderr, "could not init messaging context\n");
    5859                exit(1);
    5960        }
    60        
     61
    6162        if (argc != 3) {
    6263                fprintf(stderr, "%s: Usage - %s pid count\n", argv[0],
     
    8889
    8990        for (i=0;i<n;i++) {
    90                 messaging_send(msg_ctx, pid_to_procid(getpid()), MSG_PING,
     91                messaging_send(msg_ctx, messaging_server_id(msg_ctx), MSG_PING,
    9192                               &data_blob_null);
    92                 messaging_send_buf(msg_ctx, pid_to_procid(getpid()), MSG_PING,
    93                                    (uint8 *)buf, 11);
     93                messaging_send_buf(msg_ctx, messaging_server_id(msg_ctx),
     94                                   MSG_PING,(uint8 *)buf, 11);
    9495        }
    9596
     
    133134                        }
    134135                }
    135                
     136
    136137                printf("waiting for %d remaining replies (done %d)\n",
    137138                       (int)(ping_count - pong_count), pong_count);
     
    142143                        }
    143144                }
    144                
     145
    145146                if (ping_count != pong_count) {
    146147                        fprintf(stderr, "ping test failed! received %d, sent "
    147148                                "%d\n", pong_count, (int)ping_count);
    148149                }
    149                
     150
    150151                printf("ping rate of %.0f messages/sec\n",
    151152                       (ping_count+pong_count)/timeval_elapsed(&tv));
Note: See TracChangeset for help on using the changeset viewer.