OmniMessaging ZLE Adapter Programmer's Guide 6.2

OmniMessaging ZLE Mail Adapter Installation Guide
Opsol Confidential and Proprietary 13
short nPathsendError, nFileSysError;
short i=0, choice=0;
OMNI_sendMessage *pSendMsgBuff=NULL;
pSendMsgBuff = (OMNI_sendMessage *) calloc(1, sizeof(OMNI_sendMessage));
if (pSendMsgBuff == NULL)
exit(0);
printf("\n Enter the Pathmon name of OmniMessaging: ");
/* e.g. $OMNI */
fflush(NULL);
scanf("%s", &pmonProcessName);
printf("\n Enter the serverclass name of adapter process: ");
/* e.g. ZLE01-SRV */
fflush(NULL);
scanf("%s", &pSvrClassName);
printf("\n Do you want to send a message (YES=0, NO=1): ");
fflush(NULL);
scanf("%hd", &choice);
nPmonProcessNameLen = (short) strlen(pmonProcessName);
nSvrClassNameLen = (short) strlen(pSvrClassName);
if (!choice)
{
pSendMsgBuff->request_type = OMNI_SEND;
printf("\n Enter the originator name: ");
/* e.g. USER1 */
fflush(NULL);
scanf("%s", pSendMsgBuff->orig_name);
printf("\n Enter the originator address: ");
/* e.g. user1@domain.com */
fflush(NULL);
scanf("%s", pSendMsgBuff->orig_address);
printf("\n Enter the originator DSN flag value: ");
/* e.g. 1 */
fflush(NULL);
scanf("%ld", &pSendMsgBuff->origDSNFlag);
printf("\n Enter the number of recipients: ");
/* e.g. 1 */
fflush(NULL);
scanf("%hd", &pSendMsgBuff->dest_address_count);
if (pSendMsgBuff->dest_address_count > 10)
{
printf("\n Max 10 recipients are supported");
exit(0);
}
for (i=0; i<pSendMsgBuff->dest_address_count; i++)
{