Changeset 20628


Ignore:
Timestamp:
2009-09-18T11:23:46+12:00 (15 years ago)
Author:
mdewsnip
Message:

Now only uses cinfo.buildDate in the resumption token if a set has been specified (ie. we're only looking through one collection).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/runtime-src/src/oaiservr/abstractlistaction.cpp

    r20627 r20628  
    157157      if (this->output_docs == this->configuration->resumeAfter())
    158158      {
    159     // Get the buildDate from the build.cfg file
    160     ColInfoResponse_t cinfo;
    161     comerror_t err;
    162     protocol->get_collectinfo(collection_name, cinfo, err, cerr);
    163 
    164     ResumptionToken resumption_token(cinfo.buildDate, set_name, metadata_prefix, from, until, collection_name + ":" + position);
     159    // If a set has been specified, we can use the collection's buildDate in the resumption token
     160    text_t date_stamp = "";
     161    if (set_name != "")
     162    {
     163      ColInfoResponse_t cinfo;
     164      comerror_t err;
     165      protocol->get_collectinfo(collection_name, cinfo, err, cerr);
     166      date_stamp = cinfo.buildDate;
     167    }
     168
     169    ResumptionToken resumption_token(date_stamp, set_name, metadata_prefix, from, until, collection_name + ":" + position);
    165170
    166171    // Don't add any whitespace around the resumption token as it can confuse harvesters/validators
Note: See TracChangeset for help on using the changeset viewer.