Show
Ignore:
Timestamp:
18.04.2012 10:43:19 (9 years ago)
Author:
jmt12
Message:

Adding in required cpp code for TDBServer support (using existing TDB interactions - we don't actually support the runtime in a distributed environment... yet)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gs2-extensions/tdb-edit/trunk/src/enable_tdb.sh

    r25408 r25412  
    8282  then 
    8383    sed -i 's:collectset\:\:collectset (text_t& gsdlhome, text_t& collecthome):// @EXTENSION HEADERS@\n#include "tdbclass.h //TDB\n\n&:' ${SRCFILE} 
    84     sed -i 's:    // Use GDBM if the infodb type is empty or not one of the values above:    // @EXTENSION DATASOURCES@\n    if (infodbtype == "tdb") {db_ptr = new tdbclass(gsdlhome);} //TDB\n\n&:' ${SRCFILE} 
     84    sed -i 's:    // Use GDBM if the infodb type is empty or not one of the values above:    // @EXTENSION DATASOURCES@\n    if (infodbtype == "tdb") {db_ptr = new tdbclass(gsdlhome);} //TDB\n    if (infodbtype == "tdbserver") {db_ptr = new tdbclass(gsdlhome);} //TDBServer\n\n&:' ${SRCFILE} 
    8585  else 
    8686    sed -i 's:// @EXTENSION HEADERS@:&\n#include "tdbclass.h" //TDB:' ${SRCFILE} 
    87     sed -i 's:// @EXTENSION DATASOURCES@:&\n    if (infodbtype == "tdb") {db_ptr = new tdbclass(gsdlhome);} //TDB:' ${SRCFILE} 
     87    sed -i 's:// @EXTENSION DATASOURCES@:&\n    if (infodbtype == "tdb") {db_ptr = new tdbclass(gsdlhome);} //TDB\n    if (infodbtype == "tdbserver") {db_ptr = new tdbclass(gsdlhome);} //TDBServer:' ${SRCFILE} 
    8888  fi 
    8989fi 
     
    106106  if [ $? -eq 1 ] 
    107107  then 
    108     sed -i 's:  if (infodbtype=="gdbm") {:  // @EXTENSION DATASOURCES@\n  if (infodbtype == "tdb") { return; } // TDB Do nothing\n\n&:' ${SRCFILE} 
     108    sed -i 's:  if (infodbtype=="gdbm") {:  // @EXTENSION DATASOURCES@\n  if (infodbtype == "tdb") { return; } // TDB Do nothing\n  if (infodbtype == "tdbserver") { return; } // TDBServer Do nothing\n\n&:' ${SRCFILE} 
    109109  else 
    110     sed -i 's:  // @EXTENSION DATASOURCES@:&\n  if (infodbtype == "tdb") { return; } // TDB Do nothing:' ${SRCFILE} 
     110    sed -i 's:  // @EXTENSION DATASOURCES@:&\n  if (infodbtype == "tdb") { return; } // TDB Do nothing\n  if (infodbtype == "tdbserver") { return; } // TDBServer Do nothing:' ${SRCFILE} 
    111111  fi 
    112112fi