]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librados: don't read attributes until the callback is done!
authorGreg Farnum <gregf@hq.newdream.net>
Fri, 16 Jul 2010 23:12:38 +0000 (16:12 -0700)
committerGreg Farnum <gregf@hq.newdream.net>
Fri, 16 Jul 2010 23:18:44 +0000 (16:18 -0700)
src/librados.cc

index f6b8298c58851a3b954a28a07166b18c5163469f..02d078a561d7f507d3984f40cd787b63ae25afff 100644 (file)
@@ -1236,14 +1236,17 @@ int RadosClient::getxattrs(PoolCtx& pool, const object_t& oid, map<std::string,
   lock.Unlock();
 
   attrset.clear();
-  for (map<string,bufferlist>::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<string,bufferlist>::iterator p = aset.begin(); p != aset.end(); p++) {
+    cerr << p->first << std::endl;
+    attrset[p->first.c_str()] = p->second;
+  }
   return r;
 }