- Various fixes to make mountaingum work
This commit is contained in:
35
statemon.c
35
statemon.c
@ -132,24 +132,26 @@ static pHdb recurseInterestNode(pHdb current, char *pDevice){
|
||||
*/
|
||||
alias = FindAliases(pServ->pSics,pSicsdev);
|
||||
pPtr = alias;
|
||||
while((pPtr = stptok(pPtr,pAlias,131,",")) != NULL){
|
||||
if(strcmp(pAlias,pDevice) == 0){
|
||||
return current;
|
||||
}
|
||||
}
|
||||
if(alias != NULL){
|
||||
free(alias);
|
||||
}
|
||||
}
|
||||
if(pPtr != NULL){
|
||||
while((pPtr = stptok(pPtr,pAlias,131,",")) != NULL){
|
||||
if(strcmp(pAlias,pDevice) == 0){
|
||||
return current;
|
||||
}
|
||||
}
|
||||
if(alias != NULL){
|
||||
free(alias);
|
||||
}
|
||||
}
|
||||
}
|
||||
current = current->child;
|
||||
while(current != NULL){
|
||||
result = recurseInterestNode(current, pDevice);
|
||||
result = recurseInterestNode(current, pDevice);
|
||||
if(result != NULL){
|
||||
return result;
|
||||
}
|
||||
current = current->next;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
current = current->next;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
@ -192,6 +194,9 @@ static int StateHdbInterest(int iEvent, void *pEvent, void *pUser,
|
||||
snprintf(buffer,1024,"%s FINISH", path);
|
||||
SCWriteInContext(pCon,buffer,eWarning,cc);
|
||||
}
|
||||
if(path != NULL){
|
||||
free(path);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user