~ubuntu-branches/debian/sid/nordugrid-arc/sid

« back to all changes in this revision

Viewing changes to src/libs/data-staging/DataDeliveryLocalComm.cpp

  • Committer: Package Import Robot
  • Author(s): Mattias Ellert
  • Date: 2012-12-13 16:41:31 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20121213164131-0fumka0jar8mxm07
Tags: 2.0.1-1
* 2.0.1 Release
* Drop patches accepted upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
      // maybe just nordugrid_libexec_loc_?
55
55
      std::string execpath = Arc::ArcLocation::Get()+G_DIR_SEPARATOR_S+PKGLIBEXECSUBDIR+G_DIR_SEPARATOR_S+"DataStagingDelivery";
56
56
      args.push_back(execpath);
 
57
 
57
58
      // check for alternative source or destination eg cache, mapped URL, TURL
58
 
      if (dtr->get_source()->TransferLocations().empty()) {
 
59
      std::string surl;
 
60
      if (!dtr->get_mapped_source().empty()) {
 
61
        surl = dtr->get_mapped_source();
 
62
      }
 
63
      else if (!dtr->get_source()->TransferLocations().empty()) {
 
64
        surl = dtr->get_source()->TransferLocations()[0].fullstr();
 
65
      }
 
66
      else {
59
67
        logger_->msg(Arc::ERROR, "DTR %s: No locations defined for %s", dtr_id, dtr->get_source()->str());
60
68
        return;
61
69
      }
62
 
      std::string surl = dtr->get_source()->TransferLocations()[0].fullstr();
63
 
      bool caching = false;
64
 
      if (!dtr->get_mapped_source().empty())
65
 
        surl = dtr->get_mapped_source();
66
70
 
67
71
      if (dtr->get_destination()->TransferLocations().empty()) {
68
72
        logger_->msg(Arc::ERROR, "DTR %s: No locations defined for %s", dtr_id, dtr->get_destination()->str());
69
73
        return;
70
74
      }
71
75
      std::string durl = dtr->get_destination()->TransferLocations()[0].fullstr();
 
76
      bool caching = false;
72
77
      if ((dtr->get_cache_state() == CACHEABLE) && !dtr->get_cache_file().empty()) {
73
78
        durl = dtr->get_cache_file();
74
79
        caching = true;