]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librados: watch request should wait for safe response
authorYehuda Sadeh <yehuda@hq.newdream.net>
Fri, 26 Aug 2011 18:43:47 +0000 (11:43 -0700)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Fri, 26 Aug 2011 18:43:47 +0000 (11:43 -0700)
src/librados.cc

index 227022defdc38183185752be949773be5df2e699..679eaa52843f909a5156d12f8fa2cbdf6f070b1c 100644 (file)
@@ -2427,7 +2427,7 @@ int librados::RadosClient::watch(IoCtxImpl& io, const object_t& oid, uint64_t ve
   Cond cond;
   bool done;
   int r;
-  Context *onack = new C_SafeCond(&mylock, &cond, &done, &r);
+  Context *onfinish = new C_SafeCond(&mylock, &cond, &done, &r);
   eversion_t objver;
 
   lock.Lock();
@@ -2437,7 +2437,7 @@ int librados::RadosClient::watch(IoCtxImpl& io, const object_t& oid, uint64_t ve
   prepare_assert_ops(&io, &rd);
   rd.watch(*cookie, ver, 1);
   bufferlist bl;
-  wc->linger_id = objecter->linger(oid, io.oloc, rd, io.snap_seq, bl, NULL, 0, onack, NULL, &objver);
+  wc->linger_id = objecter->linger(oid, io.oloc, rd, io.snap_seq, bl, NULL, 0, NULL, onfinish, &objver);
   lock.Unlock();
 
   mylock.Lock();