Changeset 514 for trunk/gsdl/src/recpt


Ignore:
Timestamp:
1999-09-02T12:28:42+12:00 (25 years ago)
Author:
rjmcnab
Message:

removed dependancy on GSDL_GSDLHOME

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/statusaction.cpp

    r421 r514  
    1212/*
    1313   $Log$
     14   Revision 1.16  1999/09/02 00:28:42  rjmcnab
     15   removed dependancy on GSDL_GSDLHOME
     16
    1417   Revision 1.15  1999/07/30 02:24:42  sjboddie
    1518   added collectinfo argument to some functions
     
    7174
    7275#include "statusaction.h"
     76#include "fileutil.h"
    7377#include <assert.h>
    7478
     
    583587                   outconvertclass &outconvert,
    584588                   ostream &textout, ostream &/*logout*/) {
     589  if (recpt == NULL) return;
     590  const recptconf &rcinfo = recpt->get_configinfo ();
     591  text_t initfilename = filename_cat (rcinfo.gsdlhome, "etc", "initout.txt");
     592  char *cinitfilename = initfilename.getcstr();
     593  if (cinitfilename == NULL) return;
     594
    585595  textout << outconvert << disp << "_status:header_(Init log)\n";
    586596  textout << outconvert << "<h2>Init log</h2>\n";
    587597
    588   ifstream initin (GSDL_GSDLHOME "/etc/initout.txt");
     598  ifstream initin (cinitfilename, ios::in | ios::nocreate);
     599  delete cinitfilename;
    589600  if (initin) {
    590601    textout << outconvert << "<p>The initialisation error log, "
    591       GSDL_GSDLHOME "/etc/initout.txt, contains the\n";
     602        << initfilename << ", contains the\n";
    592603    textout << outconvert << "following information:\n\n";
    593604    text_t errorpage = "<p><pre>\n";
     
    605616   
    606617  } else {
    607     textout << outconvert << "Couldn't read initialisation error log, " GSDL_GSDLHOME "/etc/initout.txt.\n";
     618    textout << outconvert << "Couldn't read initialisation error log, "
     619        << initfilename << ".\n";
    608620  }
    609621
     
    614626                    outconvertclass &outconvert,
    615627                    ostream &textout, ostream &logout) {
     628  if (recpt == NULL) return;
     629  const recptconf &rcinfo = recpt->get_configinfo ();
     630  text_t errfilename = filename_cat (rcinfo.gsdlhome, "etc", "errout.txt");
     631  char *cerrfilename = errfilename.getcstr();
     632  if (cerrfilename == NULL) return;
     633
    616634  textout << outconvert << disp << "_status:header_(Error log)\n";
    617635  textout << outconvert << "<h2>Error log</h2>\n";
    618636  logout << flush;
    619637
    620   ifstream errin (GSDL_GSDLHOME "/etc/errout.txt");
     638  ifstream errin (cerrfilename, ios::in | ios::nocreate);
     639  delete cerrfilename;
    621640  if (errin) {
    622     textout << outconvert << "<p>The error log, " GSDL_GSDLHOME "/etc/errout.txt, contains the\n";
     641    textout << outconvert << "<p>The error log, "
     642        << errfilename << ", contains the\n";
    623643    textout << outconvert << "following information:\n\n";
    624644    text_t errorpage = "<p><pre>\n";
     
    636656
    637657  } else {
    638     textout << outconvert << "Couldn't read error log, " GSDL_GSDLHOME "/etc/errout.txt.\n";
     658    textout << outconvert << "Couldn't read error log, "
     659        << errfilename << ".\n";
    639660  }
    640661
Note: See TracChangeset for help on using the changeset viewer.