mirror of https://github.com/BOINC/boinc.git
use wrapper to destroy event and result
git-svn-id: svn+ssh://cvs.lpds.sztaki.hu/var/lib/svn/szdg/dcapi/trunk@752 a7169a2c-3604-0410-bc95-c702d8d87f7a
This commit is contained in:
parent
26450f28bb
commit
45e0204f2a
|
@ -19,6 +19,7 @@
|
|||
#include "condor_wu.h"
|
||||
#include "condor_log.h"
|
||||
#include "condor_utils.h"
|
||||
#include "condor_event.h"
|
||||
|
||||
|
||||
/********************************************************************* INIT */
|
||||
|
@ -664,33 +665,17 @@ void
|
|||
DC_destroyMasterEvent(DC_MasterEvent *event)
|
||||
{
|
||||
DC_log(LOG_DEBUG, "DC_destroyMasterEvent(%p)", event);
|
||||
if (!event)
|
||||
return;
|
||||
switch (event->type)
|
||||
{
|
||||
case DC_MASTER_RESULT:
|
||||
g_free(event->result);
|
||||
break;
|
||||
case DC_MASTER_SUBRESULT:
|
||||
_DC_destroyPhysicalFile(event->subresult);
|
||||
break;
|
||||
case DC_MASTER_MESSAGE:
|
||||
g_free(event->message);
|
||||
break;
|
||||
}
|
||||
_DC_event_destroy(event);
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************** Messaging */
|
||||
|
||||
static int _DC_message_id= 0;
|
||||
|
||||
/* Sends a message to a running work unit. */
|
||||
int
|
||||
DC_sendWUMessage(DC_Workunit *wu, const char *message)
|
||||
{
|
||||
GString *dn;
|
||||
FILE *f;
|
||||
int ret;
|
||||
|
||||
if (!_DC_wu_check(wu))
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
|
||||
DC_Result *
|
||||
_DC_create_result(DC_Workunit *wu)
|
||||
_DC_result_create(DC_Workunit *wu)
|
||||
{
|
||||
DC_Result *r;
|
||||
|
||||
|
@ -16,4 +16,13 @@ _DC_create_result(DC_Workunit *wu)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
_DC_result_destroy(DC_Result *result)
|
||||
{
|
||||
if (!result)
|
||||
return;
|
||||
g_free(result);
|
||||
}
|
||||
|
||||
|
||||
/* End of condor_result.c */
|
||||
|
|
|
@ -12,7 +12,8 @@ extern "C" {
|
|||
#include "condor_defs.h"
|
||||
|
||||
|
||||
extern DC_Result *_DC_create_result(DC_Workunit *wu);
|
||||
extern DC_Result *_DC_result_create(DC_Workunit *wu);
|
||||
extern void _DC_result_destroy(DC_Result *result);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
Loading…
Reference in New Issue