PSI sics-cvs-psi-2006
This commit is contained in:
8
danu.c
8
danu.c
@@ -95,7 +95,8 @@ static int writeDataNumber(pDataNumber self, int iNum)
|
||||
return 1;
|
||||
}
|
||||
/*------------------- The CallBack function for interest ------------------*/
|
||||
static int InterestCallback(int iEvent, void *pEvent, void *pUser)
|
||||
static int InterestCallback(int iEvent, void *pEvent, void *pUser,
|
||||
commandContext cc)
|
||||
{
|
||||
pDataNumber self = NULL;
|
||||
SConnection *pCon = NULL;
|
||||
@@ -120,7 +121,7 @@ static int writeDataNumber(pDataNumber self, int iNum)
|
||||
if(iNum > 0)
|
||||
{
|
||||
snprintf(pBueffel,131,"sicsdatanumber = %d", iNum);
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
SCWriteInContext(pCon,pBueffel,eValue,cc);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@@ -330,7 +331,8 @@ int NewThousand(pDataNumber self)
|
||||
}
|
||||
if(strcmp(argv[1],"interest") == 0)
|
||||
{
|
||||
lID = RegisterCallback(self->pCall, VALUECHANGE, InterestCallback,
|
||||
lID = RegisterCallback(self->pCall, SCGetContext(pCon),
|
||||
VALUECHANGE, InterestCallback,
|
||||
pCon, NULL);
|
||||
SCRegister(pCon,pSics, self->pCall,lID);
|
||||
SCSendOK(pCon);
|
||||
|
||||
Reference in New Issue
Block a user