diff --git a/checkin_notes b/checkin_notes index 316241f006..c79c755be3 100755 --- a/checkin_notes +++ b/checkin_notes @@ -14980,4 +14980,14 @@ Brian 9 July 2004 - makes sure that project will get work if there is space on client sched/ - sched_send.C \ No newline at end of file + sched_send.C + +Jeff 9 July 2004 + - create_work() now take a new parameter - the path to the result template + file. This was needed because some programs (eg the sah splitter) are + not run from the project root directory. + + tools/ + backend_lib.C + backend_lib.h + create_work.C diff --git a/tools/backend_lib.C b/tools/backend_lib.C index b573742fc8..2821a5fa86 100644 --- a/tools/backend_lib.C +++ b/tools/backend_lib.C @@ -279,6 +279,7 @@ int create_work( DB_WORKUNIT& wu, const char* _wu_template, const char* result_template_filename, + const char* result_template_filepath, const char* infile_dir, const char** infiles, int ninfiles, @@ -309,10 +310,10 @@ int create_work( } retval = read_filename( - result_template_filename, _result_template, sizeof(_result_template) + result_template_filepath, _result_template, sizeof(_result_template) ); if (retval) { - fprintf(stderr, "create_work: can't read result template\n"); + fprintf(stderr, "create_work: can't read result template file %s\n", result_template_filepath); return retval; } diff --git a/tools/backend_lib.h b/tools/backend_lib.h index e9e1eac2eb..648f9401dd 100644 --- a/tools/backend_lib.h +++ b/tools/backend_lib.h @@ -51,7 +51,8 @@ extern int create_result( extern int create_work( DB_WORKUNIT& wu, const char* wu_template, - const char* result_template, + const char* result_template_filename, + const char* result_template_filepath, const char* infile_dir, const char** infiles, int ninfiles, diff --git a/tools/create_work.C b/tools/create_work.C index 97c835b87b..ea362ff971 100644 --- a/tools/create_work.C +++ b/tools/create_work.C @@ -61,7 +61,7 @@ int main(int argc, char** argv) { DB_WORKUNIT wu; int retval; char wu_template[LARGE_BLOB_SIZE]; - char wu_template_file[256], result_template_file[256]; + char wu_template_file[256], result_template_file[256], result_template_path[1024]; char keyfile[256]; char** infiles = NULL; int i, ninfiles; @@ -182,10 +182,13 @@ int main(int argc, char** argv) { exit(1); } + strcpy(result_template_path, "./"); + strcat(result_template_path, result_template_file); retval = create_work( wu, wu_template, result_template_file, + result_template_path, download_dir, const_cast(infiles), ninfiles,