Changeset 10039
- Timestamp:
- 2005-06-09T17:30:47+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/gtiaction.cpp
r10037 r10039 430 430 } 431 431 432 delete[] cgi_argument_name_cstr; 432 433 ++cgi_argument; 433 434 } … … 442 443 do_gti_submission(gti_arguments, submission_text, logout); 443 444 logout << "Done." << endl; 445 446 delete[] source_chunk_key_start_cstr; 447 delete[] target_chunk_key_start_cstr; 444 448 } 445 449 … … 559 563 // Send the request to gti.pl and read the XML output 560 564 text_t gti_command = "perl -S " + filename_cat(gsdlhome, "bin", "script", "gti.pl") + " " + gti_arguments; 561 FILE *gti_pipe = popen(gti_command.getcstr(), "r"); 565 char* gti_command_cstr = gti_command.getcstr(); 566 FILE *gti_pipe = popen(gti_command_cstr, "r"); 567 delete[] gti_command_cstr; 562 568 if (gti_pipe == NULL) { 563 569 logout << "Error: Could not open pipe for GTI command " << gti_command << endl; … … 582 588 char* gti_response_xml_text_cstr = gti_response_xml_text.getcstr(); 583 589 int parse_status = XML_Parse(xml_parser, gti_response_xml_text_cstr, strlen(gti_response_xml_text_cstr), XML_TRUE); 590 delete[] gti_response_xml_text_cstr; 584 591 if (parse_status == XML_STATUS_ERROR) { 585 592 logout << "Parse error " << XML_ErrorString(XML_GetErrorCode(xml_parser)) << " at line " << XML_GetCurrentLineNumber(xml_parser) << endl; … … 587 594 } 588 595 589 free(gti_response_xml_text_cstr);590 596 XML_ParserFree(xml_parser); 591 597 … … 600 606 // Send the submission to gti.pl 601 607 text_t gti_command = "perl -S " + filename_cat(gsdlhome, "bin", "script", "gti.pl") + " " + gti_arguments; 602 FILE *gti_pipe = popen(gti_command.getcstr(), "w"); 608 char* gti_command_cstr = gti_command.getcstr(); 609 FILE *gti_pipe = popen(gti_command_cstr, "w"); 610 delete[] gti_command_cstr; 603 611 if (gti_pipe == NULL) { 604 612 logout << "Error: Could not open pipe for GTI command " << gti_command << endl; … … 609 617 char* gti_submission_cstr = gti_submission.getcstr(); 610 618 fwrite(gti_submission_cstr, 1, strlen(gti_submission_cstr), gti_pipe); 611 free(gti_submission_cstr);619 delete[] gti_submission_cstr; 612 620 613 621 pclose(gti_pipe);
Note:
See TracChangeset
for help on using the changeset viewer.