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

« back to all changes in this revision

Viewing changes to src/hed/acc/ldap/JobListRetrieverPluginLDAPNG.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:
74
74
    // Applying filter. Must be done through EndpointQueryOptions.
75
75
    url.ChangeLDAPFilter("(|(nordugrid-job-globalowner=" + escaped_dn + "))");
76
76
 
 
77
    DataBuffer buffer;
77
78
    DataHandle handler(url, uc);
78
 
    DataBuffer buffer;
79
79
 
80
80
    if (!handler) {
81
81
      logger.msg(INFO, "Can't create information handle - is the ARC ldap DMC plugin available?");
105
105
    XMLNodeList xJobs = xmlresult.XPathLookup("//nordugrid-job-globalid[objectClass='nordugrid-job']", NS());
106
106
    for (XMLNodeList::iterator it = xJobs.begin(); it != xJobs.end(); ++it) {
107
107
      Job j;
 
108
      if ((*it)["nordugrid-job-comment"]) {
 
109
        std::string comment = (std::string)(*it)["nordugrid-job-comment"];
 
110
        std::string submittedvia = "SubmittedVia=";
 
111
        if (comment.compare(0, submittedvia.length(), submittedvia) == 0) {
 
112
          std::string interfacename = comment.substr(submittedvia.length());
 
113
          if (interfacename != "org.nordugrid.gridftpjob") {
 
114
            logger.msg(DEBUG, "Skipping retrieved job (%s) because it was submitted via another interface (%s).", (std::string)(*it)["nordugrid-job-globalid"], interfacename);
 
115
            continue;
 
116
          }
 
117
        }
 
118
      }
108
119
      if ((*it)["nordugrid-job-globalid"])
109
120
        j.JobID = (std::string)(*it)["nordugrid-job-globalid"];
110
121
      if ((*it)["nordugrid-job-jobname"])
124
135
      jobs.push_back(j);
125
136
    }
126
137
 
127
 
    if (!jobs.empty()) {
128
 
      s = EndpointQueryingStatus::SUCCESSFUL;
129
 
    }
 
138
    s = EndpointQueryingStatus::SUCCESSFUL;
130
139
 
131
140
    return s;
132
141
  }