diff options
author | Colin Patrick McCabe <cmccabe@alumni.cmu.edu> | 2011-02-23 04:43:12 -0800 |
---|---|---|
committer | Colin Patrick McCabe <cmccabe@alumni.cmu.edu> | 2011-02-23 10:17:30 -0800 |
commit | 5f730868525ac370ecc0b55fcbc44f52ec11ebbd (patch) | |
tree | 02aaac9a6875ba15256ed4bbc1b1c76cb5d5907a /src/testrados.c | |
parent | 871fa1b322c90473aefa4272ed15f31450322318 (diff) | |
download | ceph-5f730868525ac370ecc0b55fcbc44f52ec11ebbd.tar.gz |
Splt rados_init into rados_create + rados_connect
Splt rados_init into rados_create and rados_connect. The pattern will
be for users to call create, set configuration, and then connect. Rename
rados_release to rados_destroy, to be more symmetrical with
rados_create. You can't reconnect after calling destroy.
Don't create the messenger inside the RadosClient constructor. Instead,
wait until RadosClient::connect().
Rename rados_conf_apply to rados_reopen_log. Add comment about SIGHUP.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Diffstat (limited to 'src/testrados.c')
-rw-r--r-- | src/testrados.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/testrados.c b/src/testrados.c index 5259b24e3ee..1e7dfe3850e 100644 --- a/src/testrados.c +++ b/src/testrados.c @@ -28,7 +28,10 @@ int main(int argc, const char **argv) exit(1); } - rados_conf_parse_argv(cl, argc, argv); + if (rados_connect(cl)) { + printf("error connecting\n"); + exit(1); + } /* create a pool */ r = rados_create_pool("foo"); @@ -128,7 +131,7 @@ int main(int argc, const char **argv) printf("rados_delete_pool = %d\n", r); r = rados_close_pool(pool); - rados_deinitialize(); + rados_destroy(cl); return 0; } |