PREV TOC HOME INDEX NEXT


ipm_Close( )


Termination Events | Cautions | Errors | Example | See Also

Name: int ipm_Close(nDeviceHandle, *pCloseInfo)
Inputs:

int nDeviceHandle

  • IP Media device handle

IPM_CLOSE_INFO *pCloseInfo

  • set to NULL
Returns:

0 on success

-1 on failure

Includes:

srllib.h

ipmlib.h

Category:

System Control

Mode:

synchronous only

Platform:

DM/IP, IPT, HMP

Description

The ipm_Close( ) function closes an IP channel device and disables the generation of all events.

Parameter

Description

nDeviceHandle IP Media device handle returned by ipm_Open( )
pCloseInfo set to NULL; reserved for future use

Termination Events

None - this function operates in synchronous mode only.

Cautions

Errors

If the function returns -1 to indicate failure, call ATDV_LASTERR( ) and ATDV_ERRMSGP( ) to return one of the following errors:

EIPM_BADPARM
Invalid parameter
EIPM_CONFIG
Configuration error
EIPM_FWERROR
Firmware error

Example

#include <stdio.h>
#include <srllib.h>
#include <ipmlib.h> 
void main()
{
    int nDeviceHandle;
    /*
    .
    Main Processing
    .
    .
    .
    */ 
    /*
    Application is shutting down.
    Need to close IP device handle.
    ASSUMPTION: A valid nDeviceHandle was obtained from prior call to ipm_Open().
    */
    if(ipm_Close(nDeviceHandle, NULL) == -1)
    {
        printf("----------->ipm_Close() failed for handle = %d\n", nDeviceHandle);
        /*
        .
        .
        Perform Error Processing
        .
        .
        */
    }
    /*
    .
    .
    .
    Continue cleanup
    .
    .
    */
} 

See Also


PREV TOC HOME INDEX NEXT

Click here to contact Telecom Support Resources

Copyright 2002, Intel Corporation
All rights reserved
This page generated November, 2002