- New batch file management module
- New oscillator module - Bug fixes SKIPPED: psi/buffer.c psi/el734hp.c psi/el737hpdriv.c psi/make_gen psi/nextrics.c psi/nxamor.c psi/pimotor.c psi/polterwrite.c psi/psi.c psi/swmotor2.c psi/tasscan.c psi/tricssupport.c psi/tricssupport.h psi/tecs/make_gen psi/utils/ecb_load_new/ecb_load.c psi/utils/ecb_load_new/ecb_load.h psi/utils/ecb_load_new/ecbdriv_els.c psi/utils/ecb_load_new/gpib_els.c psi/utils/ecb_load_new/makefile psi/utils/ecb_load_new/makefile_EGPIB psi/utils/ecb_load_new/makefile_GPIB
This commit is contained in:
55
conman.c
55
conman.c
@ -837,7 +837,7 @@ static void writeToLogFiles(SConnection *self, char *buffer)
|
||||
This version writes only to configured log files but not to sockets.
|
||||
Used for automatic file execution for the WWW interface
|
||||
*/
|
||||
static int SCFileWrite(SConnection *self, char *buffer, int iOut)
|
||||
int SCFileWrite(SConnection *self, char *buffer, int iOut)
|
||||
{
|
||||
int i, iPtr, iRet;
|
||||
char pBueffel[80];
|
||||
@ -1557,6 +1557,54 @@ static void writeToLogFiles(SConnection *self, char *buffer)
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
int SCUnregisterID(SConnection *pCon, long ID)
|
||||
{
|
||||
int iRet;
|
||||
Item sItem;
|
||||
|
||||
if(!VerifyConnection(pCon))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
iRet = LLDnodePtr2First(pCon->iList);
|
||||
while(iRet != 0)
|
||||
{
|
||||
LLDnodeDataTo(pCon->iList,&sItem);
|
||||
if(sItem.lID == ID )
|
||||
{
|
||||
LLDnodeDelete(pCon->iList);
|
||||
LLDnodePtr2Prev(pCon->iList);
|
||||
}
|
||||
iRet = LLDnodePtr2Next(pCon->iList);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
long SCgetCallbackID(SConnection *pCon, void *pData)
|
||||
{
|
||||
int iRet;
|
||||
Item sItem;
|
||||
pICallBack pInter;
|
||||
|
||||
if(!VerifyConnection(pCon))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
pInter = (pICallBack)pData;
|
||||
iRet = LLDnodePtr2First(pCon->iList);
|
||||
while(iRet != 0)
|
||||
{
|
||||
LLDnodeDataTo(pCon->iList,&sItem);
|
||||
if(sItem.pInterface == pInter)
|
||||
{
|
||||
return sItem.lID;
|
||||
}
|
||||
iRet = LLDnodePtr2Next(pCon->iList);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*---------------------- The callback data structure --------------------*/
|
||||
typedef struct {
|
||||
SConnection *pCon;
|
||||
@ -1656,7 +1704,8 @@ static void writeToLogFiles(SConnection *self, char *buffer)
|
||||
/* get CallBack interface */
|
||||
pDum = (pDummy)pCom->pData;
|
||||
assert(pDum);
|
||||
pInterface = (pICallBack)pDum->pDescriptor->GetInterface(pDum,CALLBACKINTERFACE);
|
||||
pInterface = (pICallBack)pDum->pDescriptor->GetInterface(pDum,
|
||||
CALLBACKINTERFACE);
|
||||
if(!pInterface)
|
||||
{
|
||||
sprintf(pBueffel,"ERROR: %s does not support CallBacks",
|
||||
@ -1772,7 +1821,7 @@ static void writeToLogFiles(SConnection *self, char *buffer)
|
||||
else
|
||||
{
|
||||
SCWrite(self,"ERROR: Bad login",eError);
|
||||
|
||||
printf("Bad login string %s\n", pPtr);
|
||||
}
|
||||
}
|
||||
free(pPtr);
|
||||
|
Reference in New Issue
Block a user