/* If find *MSGQ, means log connect msg to QTCP msg queue */
/******************************************************************/
fLogMsg = fTrue;
} /* endif */
if (NULL != strstr(dtaara.contents, "*FILE")) {
/******************************************************************/
/* If find *FILE, means log connect msg to SRCPF or PF */
/******************************************************************/
fLogFile = fTrue;
} /* endif */
if (NULL != strstr(dtaara.contents, "*DEBUG")) {
/******************************************************************/
/* If find *DEBUG, log flight records to map file member DEBUG */
/******************************************************************/
Figure 302. Sample WSG Server Logon Exit Program (Part 18 of 50)
fDebug = fTrue;
} /* endif */
/********************************************************************/
/* Map file is supposed to be the first string in the data area */
/********************************************************************/
pszDataArea = strtok(dtaara.contents, " ");
} /* endif */
if (fDebug) {
/********************************************************************/
/* record() output goes to standard out */
/********************************************************************/
Figure 302. Sample WSG Server Logon Exit Program (Part 19 of 50)
sprintf(pcOpenFile, "%s(%s)", pszDataArea, pszDebug);
sprintf(pcOpenParms, "a+, lrecl=%d, recfm=v", RECORD_WIDTH);
pDebug = freopen(pcOpenFile, pcOpenParms, stdout);
} /* endif */
/********************************************************************/
/* Initialize for QMHSNDM API calls later */
/********************************************************************/
memset(acMsg, 0x00, sizeof(acMsg));
memset(acMsgKey, 0x00, sizeof(acMsgKey));
record("\n");
record("wsgexit: >>>>> entry\n");
record("wsgexit: Signals -> handler\n");
signal(SIGALL, &handler); /* Trap all signals with our handler */
iParms = 11; /* Total of 12 parms on interface */
record("wsgexit: argc: %d iParms: %d\n", argc, iParms);
Figure 302. Sample WSG Server Logon Exit Program (Part 20 of 50)
580 OS/400 TCP/IP Configuration and Reference V4R4