Skip to content

Commit

Permalink
Fix: MaxOutputSize now accepts values larger than 2GB
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://cvs.lpds.sztaki.hu/var/lib/svn/szdg/dcapi/trunk@2557 a7169a2c-3604-0410-bc95-c702d8d87f7a
  • Loading branch information
atisu authored and Adam Visegradi committed Dec 2, 2013
1 parent 36b0b7b commit f1caf2d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
10 changes: 6 additions & 4 deletions dcapi/boinc/wu.C
Original file line number Diff line number Diff line change
Expand Up @@ -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, "<file_info>\n");
g_string_append_printf(tmpl, "\t<name><OUTFILE_%d/></name>\n", idx);
g_string_append(tmpl, "\t<generated_locally/>\n");
if (auto_upload)
g_string_append(tmpl, "\t<upload_when_present/>\n");
g_string_append_printf(tmpl, "\t<max_nbytes>%d</max_nbytes>\n", max_output);
g_string_append_printf(tmpl, "\t<max_nbytes>%g</max_nbytes>\n", max_output);

gchar *uploadURL = DC_getCfgStr(CFG_UPLOADURL);
if (!uploadURL)
Expand Down Expand Up @@ -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;
Expand All @@ -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;

Expand Down
6 changes: 6 additions & 0 deletions dcapi/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
dcapi (0.12-5) unstable; urgency=low

* Fix: MaxOutputSize now accepts values larger than 2GB.

-- Attila Csaba Marosi <atisu@sztaki.hu> 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.
Expand Down

0 comments on commit f1caf2d

Please sign in to comment.