diff --git a/ACTK1_0/se/LPE/LPCmdExtender.cpp b/ACTK1_0/se/LPE/LPCmdExtender.cpp index fcfdb2d..7d5f36f 100644 --- a/ACTK1_0/se/LPE/LPCmdExtender.cpp +++ b/ACTK1_0/se/LPE/LPCmdExtender.cpp @@ -14,14 +14,12 @@ void LPCmdExtender::addToCommand(const Command &command) const { - XMLWriter* xmlWriter = command.getXmlWriter(); + XMLWriter* xmlWriter = command.getXmlWriter(); DOMElement* extensionElement = command.getExtensionElement(); DOMElement* createElement; - thisCommand = command.getCommandType()->getCommandName(); - createElement = xmlWriter->appendChild(extensionElement, - "create", launchPhaseExtension().getURI()); + t->getCommandName().c_str(), launchPhaseExtension().getURI()); if (createData.get() != NULL) { diff --git a/ACTK1_0/se/LPE/LPCmdExtender.hpp b/ACTK1_0/se/LPE/LPCmdExtender.hpp index c4a32c8..9477f1c 100644 --- a/ACTK1_0/se/LPE/LPCmdExtender.hpp +++ b/ACTK1_0/se/LPE/LPCmdExtender.hpp @@ -14,9 +14,11 @@ class LPCmdExtender : public CommandExtension void setCreateData(LPLaunch* createData); void createXMLElement(XMLWriter* xmlWriter, DOMElement* addElement); + LPCmdExtender(Command x) : t(x.getCommandType()) {} + private: - std::string &thisCommand; + const CommandType *t; std::auto_ptr createData; }; diff --git a/AusRegCliever/server/mdAusReg.cpp b/AusRegCliever/server/mdAusReg.cpp index 316535d..0152b99 100644 --- a/AusRegCliever/server/mdAusReg.cpp +++ b/AusRegCliever/server/mdAusReg.cpp @@ -184,7 +184,7 @@ void ausRegEPPTK::doOTEB() theseLogs->logN(1,"(%d) LPE Check of unicycles.bike",cmd++); DomainCheckCommand oteCommand_2("unicycles.bike"); - LPCmdExtender oteCX; + LPCmdExtender oteCX(oteCommand_2); oteCommand_2.appendExtension(oteCX); DomainCheckResponse oteResponse_2; @@ -289,7 +289,8 @@ void ausRegEPPTK::doOTEB() theseLogs->logN(1,"(%d) Sunrise create %s with ICANN SMD test files.",cmd++,name5); DomainCreateCommand oteCommand_5(name5,pw,&RID, &tech, &ns, &admin, &billing); - LPCmdExtender oteC5X; oteC5X.addToCommand(oteCommand_5); + LPCmdExtender oteC5X(oteCommand_5); + oteC5X.addToCommand(oteCommand_5); DomainCreateResponse oteResponse_5; thisTest = Transaction(&oteCommand_5, &oteResponse_5); @@ -298,8 +299,8 @@ void ausRegEPPTK::doOTEB() theseLogs->logN(1,"(%d) Create test-validate.claimsgasix (TCN).",cmd++); DomainCreateCommand oteCommand_6("test-validate.claimsgasix",pw,&RID, &tech, &ns, &admin, &billing); - LPCmdExtender oteC6X; - oteCommand_6.appendExtension(oteC6X); + LPCmdExtender oteC6X(oteCommand_6); + oteC6X.addToCommand(oteCommand_6); DomainCreateResponse oteResponse_6; thisTest = Transaction(&oteCommand_6, &oteResponse_6);