LCGDM-794: Adapted to new API
authorAlejandro Álvarez Ayllón <alejandro.alvarez.ayllon@cern.ch>
Wed, 12 Dec 2012 15:01:10 +0000 (15:01 +0000)
committerAlejandro Álvarez Ayllón <alejandro.alvarez.ayllon@cern.ch>
Wed, 12 Dec 2012 15:01:10 +0000 (15:01 +0000)
git-svn-id: https://svn.cern.ch/reps/lcgdm/dmlite-plugins-vfs/trunk@8018 4525493e-7705-40b1-a816-d608a930855b

src/VfsDriver.cpp
src/VfsPool.cpp

index f9c87d2..e756901 100644 (file)
@@ -170,14 +170,14 @@ Location VfsPoolHandler::whereToRead(const Replica& replica) throw (DmException)
   
   Chunk single;
   
-  single.host   = this->driver_->hostName_;
-  single.path   = "/vfs" + rloc.path;
+  single.url.domain   = this->driver_->hostName_;
+  single.url.path   = "/vfs" + rloc.path;
   single.offset = 0;
   single.size   = fstat.st_size;
   
-  single["token"] = dmlite::generateToken(this->driver_->userId_, single.path,
-                                          this->driver_->tokenPasswd_,
-                                          this->driver_->tokenLife_);
+  single.url.query["token"] = dmlite::generateToken(this->driver_->userId_, single.url.path,
+                                                    this->driver_->tokenPasswd_,
+                                                    this->driver_->tokenLife_);
   
   return Location(1, single);
 }
index e14ac3b..bf9b4c8 100644 (file)
@@ -130,14 +130,14 @@ Location VfsPoolManager::whereToRead(const std::string& path) throw (DmException
   
   Chunk single;
   
-  single.host   = this->hostName_;
-  single.path   = "/vfs" + rloc.path;
+  single.url.domain   = this->hostName_;
+  single.url.path   = "/vfs" + rloc.path;
   single.offset = 0;
   single.size   = fstat.st_size;
   
-  single["token"] = dmlite::generateToken(this->userId_, single.path,
-                                          this->tokenPasswd_,
-                                          this->tokenLife_);
+  single.url.query["token"] = dmlite::generateToken(this->userId_, single.url.path,
+                                                    this->tokenPasswd_,
+                                                    this->tokenLife_);
   
   return Location(1, single);
 }