From f1caf2d38bc7ad61d59427f6f7da31cda3993ef9 Mon Sep 17 00:00:00 2001 From: atisu Date: Thu, 24 May 2012 11:16:56 +0000 Subject: [PATCH] Fix: MaxOutputSize now accepts values larger than 2GB git-svn-id: svn+ssh://cvs.lpds.sztaki.hu/var/lib/svn/szdg/dcapi/trunk@2557 a7169a2c-3604-0410-bc95-c702d8d87f7a --- dcapi/boinc/wu.C | 10 ++++++---- dcapi/debian/changelog | 6 ++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/dcapi/boinc/wu.C b/dcapi/boinc/wu.C index e17e72c0180..21c86de497a 100644 --- a/dcapi/boinc/wu.C +++ b/dcapi/boinc/wu.C @@ -1322,14 +1322,14 @@ static char *generate_wu_template(DC_Workunit *wu) } static void append_result_file_info(GString *tmpl, int idx, int auto_upload, - int max_output) + double max_output) { g_string_append(tmpl, "\n"); g_string_append_printf(tmpl, "\t\n", idx); g_string_append(tmpl, "\t\n"); if (auto_upload) g_string_append(tmpl, "\t\n"); - g_string_append_printf(tmpl, "\t%d\n", max_output); + g_string_append_printf(tmpl, "\t%g\n", max_output); gchar *uploadURL = DC_getCfgStr(CFG_UPLOADURL); if (!uploadURL) @@ -1366,7 +1366,9 @@ static void append_result_file_ref(GString *tmpl, int idx, const char *fmt, ...) static char *generate_result_template(DC_Workunit *wu) { unsigned char digest[SHA_DIGEST_LENGTH]; - int i, file_cnt, max_output_size; + int i, file_cnt; + // support output files larger than 2GB + double max_output_size; GString *path, *tmpl; char *file, *cfgval; SHA_CTX sha; @@ -1380,7 +1382,7 @@ static char *generate_result_template(DC_Workunit *wu) return NULL; } - max_output_size = DC_getClientCfgInt(wu->client_name, CFG_MAXOUTPUT, + max_output_size = DC_getClientCfgDouble(wu->client_name, CFG_MAXOUTPUT, 256 * 1024, TRUE); file_cnt = 0; diff --git a/dcapi/debian/changelog b/dcapi/debian/changelog index 396ace93179..57c38f64f5f 100644 --- a/dcapi/debian/changelog +++ b/dcapi/debian/changelog @@ -1,3 +1,9 @@ +dcapi (0.12-5) unstable; urgency=low + + * Fix: MaxOutputSize now accepts values larger than 2GB. + + -- Attila Csaba Marosi Thu, 24 May 2012 12:55:02 +0200 + dcapi (0.12-4) unstable; urgency=low * Fix: DC_FILE_IN type files should only be resolved if present.