From: Greg Farnum Date: Fri, 16 Jul 2010 23:12:38 +0000 (-0700) Subject: librados: don't read attributes until the callback is done! X-Git-Tag: v0.21~93 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9810f7eab7d56ba97bef67793bbebb3844f3fb2a;p=ceph.git librados: don't read attributes until the callback is done! --- diff --git a/src/librados.cc b/src/librados.cc index f6b8298c5885..02d078a561d7 100644 --- a/src/librados.cc +++ b/src/librados.cc @@ -1236,14 +1236,17 @@ int RadosClient::getxattrs(PoolCtx& pool, const object_t& oid, map::iterator p = aset.begin(); p != aset.end(); p++) - attrset[p->first.c_str()] = p->second; + mylock.Lock(); while (!done) cond.Wait(mylock); mylock.Unlock(); + for (map::iterator p = aset.begin(); p != aset.end(); p++) { + cerr << p->first << std::endl; + attrset[p->first.c_str()] = p->second; + } return r; }