Ignore:
Timestamp:
2000-12-04T17:08:12+13:00 (23 years ago)
Author:
jrm21
Message:

all calls to text_t.getcstr() now delete the returned ptr. Also, we
remove any " chars from the string as this may ruin the query. We don't
yet do any post-processing to filter for phrases...

File:
1 edited

Legend:

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

    r1642 r1738  
    6969  //  FILE *errfile declared in z3950cfg.h, defined in zparse.y
    7070
    71   if ((errfile=fopen(errf.getcstr(),"a"))==NULL) {
     71  char *errf_str=errf.getcstr();
     72  if ((errfile=fopen(errf_str,"a"))==NULL) {
    7273    // what do we do if we can't open the error file?
    7374    // this means that errors will go to stderr, which may stuff up
     
    7576    errfile=stderr;
    7677  }
     78  delete errf_str;
    7779  yyout=errfile;
    7880
     
    8082  // which is the bison output of zparse.y
    8183 
    82   yyin=fopen(filename.getcstr(),"r");
     84  char *filename_str=filename.getcstr();
     85  yyin=fopen(filename_str,"r");
    8386  if (yyin==NULL) {
    84     cerr << "Could not open "<<filename.getcstr()<<" for reading.\n";
     87    cerr << "Could not open "<<filename_str<<" for reading.\n";
     88    delete filename_str;
    8589    return;
    8690  }
     91  delete filename_str;
    8792  zconfigparse();
    8893
     
    230235  if (here==end) {
    231236    err=protocolError;
     237    char *coll_str=collection.getcstr();
    232238    logout << "z39.50: couldn't find collection"
    233        << collection.getcstr()
     239       << coll_str
    234240       << endl;
     241    delete coll_str;
    235242    return;
    236243  }
     
    350357    OptionValue_tarray::iterator ov_end=request.filterOptions.end();
    351358    while (ov_here != ov_end) {
    352       //      cout << "OV pair: `" << ov_here->name.getcstr() << "'=`"
    353       //   << ov_here->value.getcstr() << "'\n";
     359      // cerr << "OV pair: `" << ov_here->name.getcstr() << "'=`"
     360      //      << ov_here->value.getcstr() << "'\n";
    354361      if (ov_here->name=="Term")
    355362    {
Note: See TracChangeset for help on using the changeset viewer.