new functions that fetch on behalf host name and user name
This commit is contained in:
@@ -162,7 +162,7 @@ void camsgtask ( void *pParm )
|
||||
}
|
||||
|
||||
|
||||
void rsrvHostNameOnBehalf ( char * pBuf, unsigned bufSize )
|
||||
void epicsShareAPI casHostNameInitiatingCurrentThread ( char * pBuf, unsigned bufSize )
|
||||
{
|
||||
if ( bufSize ) {
|
||||
const char * pHostName = "";
|
||||
@@ -178,7 +178,7 @@ void rsrvHostNameOnBehalf ( char * pBuf, unsigned bufSize )
|
||||
}
|
||||
}
|
||||
|
||||
void rsrvUserNameOnBehalf ( char * pBuf, unsigned bufSize )
|
||||
void epicsShareAPI casUserNameInitiatingCurrentThread ( char * pBuf, unsigned bufSize )
|
||||
{
|
||||
if ( bufSize ) {
|
||||
const char * pUserName = "";
|
||||
|
||||
@@ -46,6 +46,8 @@
|
||||
#define DELETE_TASK(NAME)\
|
||||
if(threadNameToId(NAME)!=0)threadDestroy(threadNameToId(NAME));
|
||||
|
||||
epicsThreadPrivateId rsrvCurrentClient;
|
||||
|
||||
/*
|
||||
*
|
||||
* req_server()
|
||||
@@ -71,6 +73,8 @@ LOCAL void req_server (void *pParm)
|
||||
epicsSignalInstallSigPipeIgnore ();
|
||||
|
||||
taskwdInsert ( epicsThreadGetIdSelf (), NULL, NULL );
|
||||
|
||||
rsrvCurrentClient = epicsThreadPrivateCreate ();
|
||||
|
||||
if ( envGetConfigParamPtr ( &EPICS_CAS_SERVER_PORT ) ) {
|
||||
ca_server_port = envGetInetPortConfigParam ( &EPICS_CAS_SERVER_PORT,
|
||||
@@ -708,6 +712,7 @@ void casAttachThreadToClient ( struct client *pClient )
|
||||
epicsSignalInstallSigAlarmIgnore ();
|
||||
epicsSignalInstallSigPipeIgnore ();
|
||||
pClient->tid = epicsThreadGetIdSelf ();
|
||||
epicsThreadPrivateSet ( rsrvCurrentClient, pClient );
|
||||
taskwdInsert ( pClient->tid, NULL, NULL );
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -24,7 +24,8 @@
|
||||
|
||||
epicsShareFunc int epicsShareAPI rsrv_init (void);
|
||||
epicsShareFunc void epicsShareAPI casr (unsigned level);
|
||||
|
||||
epicsShareFunc void epicsShareAPI casHostNameInitiatingCurrentThread ( char * pBuf, unsigned bufSize );
|
||||
epicsShareFunc void epicsShareAPI casUserNameInitiatingCurrentThread ( char * pBuf, unsigned bufSize );
|
||||
#define RSRV_OK 0
|
||||
#define RSRV_ERROR (-1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user