Dialogic 05-0867-005 Table Top Game User Manual


 
cc_ReleaseCall( ) release all internal resources
184
bottleneck for processing any other event and, thereby, could affect call
handling performance.
After a connection is terminated, the cc_ReleaseCall( ) function should be
called to release the call reference number (CRN). Failure to call this function
may cause a blocking condition or a memory allocation error. Channels will
remain allocated if call-related resources are not released.
After the cc_ReleaseCall( ) function is issued, the CRN is no longer valid.
!
! !
!
Example
#include <windows.h> /* For Windows applications only */
#include <stdio.h>
#include <errno.h>
#include srllib.h
#include dtilib.h
#include cclib.h
void main()
{
LINEDEV devhdl = 0;
CRN crn = 0;
char *devname = dtiB1T1;
if ( cc_Open( &devhdl, devname,0)<0)
{
printf(Error opening device: errno = %d\n, errno);
exit(1);
}
printf(Waiting for call\n);
if ( cc_WaitCall(devhdl, &crn, NULL, -1, EV_SYNC)<0)
procdevfail(devhdl);
if ( cc_AnswerCall(crn, 0, EV_SYNC)<0)
callfail(crn);
.
.
.
.
.
/* Drop the call with NORMAL CLEARING cause value */
if ( cc_DropCall(crn, NORMAL_CLEARING, EV_SYNC)<0)
callfail(crn);
if ( cc_ReleaseCall(crn) <0)
callfail(crn);
if ( cc_Close( devhdl)<0)
printf(Error closing device, errno = %d\n, errno);
}
int callfail(CRN crn)
{
LINEDEV ld;
cc_CRN2LineDev(crn,&ld);