Changeset 25559 for main/trunk


Ignore:
Timestamp:
2012-05-09T19:46:00+12:00 (12 years ago)
Author:
ak19
Message:
  1. Dr Bainbridge fixed a bug in pingaction where it returned the message that the ping didn't succeed for any collection, even when the collection existed. 2. The pingaction no longer requires a collection argument. In the case where no collection is specified, pingaction will always return true when you call a=ping on a running GS server.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/runtime-src/src/recpt/pingaction.cpp

    r22984 r25559  
    5757                ostream &logout) {
    5858  bool wassuccess = false;
    59   comerror_t err;
     59  comerror_t err = noError;
    6060 
    6161  recptproto *collectproto = protos->getrecptproto (args["c"], logout);
     
    6363    collectproto->ping (args["c"], wassuccess, err, logout);
    6464    if (err != noError) wassuccess = false; // a communication error
     65  } else if (args["c"].empty()){ // ping-ed just the main URL
     66    wassuccess = true;
    6567  }
    6668
     
    7072      << "<title>Ping</title>\n"
    7173      << "</head>\n"
    72       << "<body>\n"
    73       << "Ping for \"" << args["c"] << "\" ";
     74      << "<body>\n";
     75  if(args["c"].empty()) {
     76    textout << outconvert << "Ping";
     77  } else {
     78    textout << outconvert << "Ping for \"" << args["c"] << "\"";
     79  }
    7480
    7581  if (wassuccess) {
Note: See TracChangeset for help on using the changeset viewer.