PSI sics-cvs-psi-2008-10-02
This commit is contained in:
16
obdes.c
16
obdes.c
@@ -44,6 +44,7 @@
|
||||
#include "obdes.h"
|
||||
#include "conman.h"
|
||||
#include "servlog.h"
|
||||
#include "hipadaba.h"
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
static void *DefaultGetInterface(void *pData,int iID)
|
||||
@@ -67,6 +68,7 @@
|
||||
}
|
||||
pRes->name = strdup(name);
|
||||
pRes->pKeys = NULL;
|
||||
pRes->parNode = NULL;
|
||||
pRes->SaveStatus = DefaultSave;
|
||||
pRes->GetInterface = DefaultGetInterface;
|
||||
return pRes;
|
||||
@@ -77,6 +79,14 @@
|
||||
assert(self);
|
||||
if(self->name) free(self->name);
|
||||
if(self->pKeys) IFDeleteOptions(self->pKeys);
|
||||
/*
|
||||
* delate a parameter node only when not linked elsewhere
|
||||
*/
|
||||
if(self->parNode != NULL){
|
||||
if(self->parNode->mama == NULL){
|
||||
DeleteHipadabaNode(self->parNode,NULL);
|
||||
}
|
||||
}
|
||||
free(self);
|
||||
|
||||
}
|
||||
@@ -146,7 +156,7 @@
|
||||
{
|
||||
if(NULL!=self)
|
||||
{
|
||||
IFSetOption(self->pKeys,keyName,eltValue);
|
||||
self->pKeys = IFSetOption(self->pKeys,keyName,eltValue);
|
||||
}
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
@@ -156,7 +166,7 @@
|
||||
{
|
||||
return;
|
||||
}
|
||||
IFSetOption(self->pKeys,"group",group);
|
||||
self->pKeys = IFSetOption(self->pKeys,"group",group);
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
void SetDescriptorDescription(pObjectDescriptor self, char *description)
|
||||
@@ -165,7 +175,7 @@
|
||||
{
|
||||
return;
|
||||
}
|
||||
IFSetOption(self->pKeys,"description", description);
|
||||
self->pKeys = IFSetOption(self->pKeys,"description", description);
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
char * GetDescriptorKey(pObjectDescriptor self, char *keyName)
|
||||
|
||||
Reference in New Issue
Block a user