First completed version of cleaned up connection object.
First testing is promising
This commit is contained in:
37
conman.c
37
conman.c
@ -2349,7 +2349,7 @@ int SCGetRunLevel(SConnection *pCon)
|
||||
return pCon->runLevel;
|
||||
}
|
||||
/*--------------------------------------------------------*/
|
||||
int SCGetIdent(SConnection *pCon)
|
||||
long SCGetIdent(SConnection *pCon)
|
||||
{
|
||||
if (!VerifyConnection(pCon)) {
|
||||
return 0;
|
||||
@ -2404,7 +2404,14 @@ char *SCGetDeviceID(SConnection *pCon)
|
||||
}
|
||||
return pCon->deviceID;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------*/
|
||||
int SCGetEnd(SConnection *pCon)
|
||||
{
|
||||
if (!VerifyConnection(pCon)) {
|
||||
return 0;
|
||||
}
|
||||
return pCon->iEnd;
|
||||
}
|
||||
/*-------------------------------------------------------*/
|
||||
void SCSetConStatus(SConnection *pCon, int conStatus)
|
||||
{
|
||||
@ -2476,4 +2483,28 @@ void SCSetGrab(SConnection *pCon, int iGrab)
|
||||
}
|
||||
pCon->iGrab = iGrab;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------*/
|
||||
void SCSetEnd(SConnection *pCon, int val)
|
||||
{
|
||||
if (!VerifyConnection(pCon)) {
|
||||
return;
|
||||
}
|
||||
pCon->iEnd = val;
|
||||
}
|
||||
/*------------------------------------------------------------*/
|
||||
void SCSetTelnet(SConnection *pCon, int val)
|
||||
{
|
||||
if (!VerifyConnection(pCon)) {
|
||||
return;
|
||||
}
|
||||
pCon->iTelnet = val;
|
||||
}
|
||||
/*------------------------------------------------------------*/
|
||||
void SCClose(SConnection *pCon)
|
||||
{
|
||||
if (!VerifyConnection(pCon)) {
|
||||
return;
|
||||
}
|
||||
ANETclose(pCon->sockHandle);
|
||||
pCon->iEnd = 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user