~ubuntu-branches/ubuntu/precise/ceph/precise-proposed

« back to all changes in this revision

Viewing changes to src/testmsgr.cc

  • Committer: Bazaar Package Importer
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2011-04-25 10:09:05 UTC
  • mfrom: (1.1.3 upstream) (0.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110425100905-exm7dfvi2v5ick02
Tags: 0.27-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#include <string>
18
18
using namespace std;
19
19
 
20
 
#include "config.h"
 
20
#include "common/config.h"
21
21
 
22
22
#include "mon/MonMap.h"
23
23
#include "mon/MonClient.h"
26
26
 
27
27
#include "common/Timer.h"
28
28
#include "common/common_init.h"
 
29
#include "common/ceph_argparse.h"
29
30
 
30
31
#ifndef DARWIN
31
32
#include <envz.h>
69
70
  argv_to_vec(argc, argv, args);
70
71
  env_to_vec(args);
71
72
 
72
 
  common_set_defaults(false);
73
 
  common_init(args, NULL, false);
 
73
  common_init(args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_UTILITY, 0);
74
74
 
75
75
  vec_to_argv(args, argc, argv);
76
76
 
86
86
  assert(whoami >= 0);
87
87
  g_conf.public_addr = mc.monmap.get_addr(whoami);
88
88
  SimpleMessenger *rank = new SimpleMessenger();
89
 
  int err = rank->bind();
 
89
  int err = rank->bind(getpid());
90
90
  if (err < 0)
91
91
    return 1;
92
92
 
96
96
  messenger->set_default_send_priority(CEPH_MSG_PRIO_HIGH);
97
97
  messenger->add_dispatcher_head(&dispatcher);
98
98
 
99
 
  rank->start();
 
99
  rank->start(false); // do not daemonize
100
100
  
101
101
  int isend = 0;
102
102
  if (whoami == 0)