]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
common/entity_name: do not populate type_id string for type==0
authorSage Weil <sage@redhat.com>
Wed, 31 May 2017 18:39:37 +0000 (14:39 -0400)
committerSage Weil <sage@redhat.com>
Wed, 31 May 2017 18:39:54 +0000 (14:39 -0400)
commite19448c9f5dc86541050c74e497ca53246419da2
treee73dbfd77fece5ca9acf3fb5b5cb148890821c46
parent0a8beea82eb6b2a9de02cfa374bc9afc240f079e
common/entity_name: do not populate type_id string for type==0

The EntityName ctor leaves type == 0.  If we encode and
then decode that value, we end up calling set(), which
tries (and fails) to populate the type_id string, leaving
you with an instance that renders as 'unknown.' instead
of ''.

Signed-off-by: Sage Weil <sage@redhat.com>
src/common/entity_name.cc