From: Colin Patrick McCabe Date: Wed, 16 Mar 2011 21:21:25 +0000 (-0700) Subject: rados_create: correctly handle null id X-Git-Tag: v0.26~116 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=32fce3ca2a6337fd8ac97a405fbbb6d026f093dc;p=ceph.git rados_create: correctly handle null id Passing a null id to rados_create means "use the default id." Signed-off-by: Colin McCabe --- diff --git a/src/librados.cc b/src/librados.cc index 838aa353aa8a..8ee0ca0addcb 100644 --- a/src/librados.cc +++ b/src/librados.cc @@ -2599,7 +2599,9 @@ extern "C" int rados_create(rados_t *pcluster, const char * const id) if (!rados_initialized) { CephInitParameters iparams(CEPH_ENTITY_TYPE_CLIENT); iparams.conf_file = ""; - iparams.name.set(CEPH_ENTITY_TYPE_CLIENT, id); + if (id) { + iparams.name.set(CEPH_ENTITY_TYPE_CLIENT, id); + } // TODO: store this conf pointer in the RadosClient and use it as our // configuration