cc_SetEvtMsk( ) sets the event mask
236
/*
* using cc_ SetEvtMsk (devhdl,CCMSK_PROGRESS
* | CCMSK_ALERT, CCACT_ADDMSK) to block the incoming ISDN
* message ALERTING and PROGRESSING. Note that the devhdl is a
* board level device.
*/
if ( cc_SetEvtMsk (devhdl, CCMSK_PROGRESS | CCMSK_ALERT,
CCACT_ADDMSK) <0)
procdevfail(devhdl);
/* continue the program. */
.
.
.
.
.
if ( cc_Close(devhdl)<0)
printf(“Error closing device, errno = %d\n”, errno);
procdevfail(devhdl);
}
int callfail(CRN crn)
{
LINEDEV ld;
cc_CRN2LineDev(crn,&ld);
procdevfail(ld);
}
int procdevfail(LINEDEV handle)
{
int reason;
char *msg;
reason = cc_CauseValue(handle);
cc_ResultMsg(handle, reason, &msg);
printf(“reason = %x - %s\n”,reason,msg);
}
!
! !
!
Errors
If the function returns < 0 to indicate failure, use the cc_CauseValue( ) function
to retrieve the reason code for the failure. The cc_ResultMsg( ) function can be
used to interpret the reason code. Error codes are defined in the files ccerr.h,
isdnerr.h, and isdncmd.h.
Error codes from the cc_SetEvtMask( ) function include the following:
Error Code Description
ERR_ISDN_LIB | E_ISBADIF Bad interface number
ERR_ISDN_LIB | E_ISBADPAR Bad input parameter