From d153259ba274e414dc9583ab54c6482f779916cf Mon Sep 17 00:00:00 2001 From: vida Date: Mon, 10 Apr 2006 12:39:54 +0000 Subject: [PATCH] Added result.c from boinc section // with little modifications. Its not finished yet! git-svn-id: svn+ssh://cvs.lpds.sztaki.hu/var/lib/svn/szdg/dcapi/trunk@435 a7169a2c-3604-0410-bc95-c702d8d87f7a --- dcapi/local/result.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 dcapi/local/result.c diff --git a/dcapi/local/result.c b/dcapi/local/result.c new file mode 100644 index 0000000000..2fc5443422 --- /dev/null +++ b/dcapi/local/result.c @@ -0,0 +1,42 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include + +#include "dc_local.h" + +/******************************************************************** + * Functions + */ + +DC_Result *_DC_createResult(const char *wu_name) +{ + DC_Result *result; + + result = g_new0(DC_Result, 1); + result->wu = _DC_getWUByName(wu_name); + if (!result->wu) + { + DC_log(LOG_ERR, "Received result for unknown WU %s", wu_name); + g_free(result); + return NULL; + } + + // XXX Finish the result correctly + + return result; +} + +void _DC_destroyResult(DC_Result *result) +{ + while (result->output_files) + { +// _DC_destroyPhysicalFile(result->output_files->data); + result->output_files = g_list_delete_link(result->output_files, + result->output_files); + } + g_free(result); +}