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
This commit is contained in:
vida 2006-04-10 12:39:54 +00:00 committed by Adam Visegradi
parent 0533b1dd0f
commit d153259ba2
1 changed files with 42 additions and 0 deletions

42
dcapi/local/result.c Normal file
View File

@ -0,0 +1,42 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#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);
}