]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common: make it safe to call env_to_vec multiple times
authorJeff Layton <jlayton@redhat.com>
Wed, 11 Oct 2017 15:16:38 +0000 (11:16 -0400)
committerJeff Layton <jlayton@redhat.com>
Wed, 11 Oct 2017 15:16:38 +0000 (11:16 -0400)
commit90e898de5f4b8d22f1a6d0e2aedf9e8c50cf72d5
tree420fe4d6c066dc706bfa0cf4fb15c4ebff5da9a3
parent6cd9c71de67a7e0b92b85aa29f42b5cb3d0dd1fc
common: make it safe to call env_to_vec multiple times

After it has been called once and we have outstanding CephContexts with
pointers into str_vec, we can't call get_str_vec on it again.

Add a static local mutex to protect access to str_vec.

Tracker: http://tracker.ceph.com/issues/21512
Signed-off-by: Jeff Layton <jlayton@redhat.com>
src/common/ceph_argparse.cc