/****************************************************************/
/* Return AllowOper of '0' - Reject this operation. */
/****************************************************************/
record("wsgexit: Client is in Reject list: AllowOper='0'\n");
memcpy(AllowOper, "0", 1);
} else {
/****************************************************************/
/* Return AllowOper of '0' - Invalid user for this operation */
/****************************************************************/
record("wsgexit: Client not in either list: AllowOper='0'\n");
memcpy(AllowOper, "0", 1);
}
} /* End Check if client is in "Reject" list */
Figure 302. Sample WSG Server Logon Exit Program (Part 25 of 50)
/********************************************************************/
/* Create message for logging */
/********************************************************************/
sprintf(acMsg,
"IP: >%s< Allow: '%c' Profile: >%s< OperLen: >%d< Oper: >%s<",
ClientIPaddr,
*AllowOper,
UserProfile,
Lgth_OperSpecInfo,
OperSpecInfo_p);
record("wsgexit: Log record:\n");
buffer(acMsg, strlen(acMsg));
Figure 302. Sample WSG Server Logon Exit Program (Part 26 of 50)
/********************************************************************/
/* If data area found and special string found, send connect msg */
/********************************************************************/
if (fLogMsg) {
memset(&esErrCode, 0x00, sizeof(esErrCode));
esErrCode.Bytes_Provided = sizeof(esErrCode);/* Ignore exceptions */
QMHSNDM("CPF9897", QCPFMSG, acMsg, strlen(acMsg), MSG_INFO,
"QTCP *USER ", 1, acMsgReply, acMsgKey,&esErrCode);
} /* endif */
/********************************************************************/
/* If data area found and special string found, log connect msg */
/********************************************************************/
if (fLogFile) {
Figure 302. Sample WSG Server Logon Exit Program (Part 27 of 50)
AppendixE. TCP/IP Application Exit Points and Programs 583