Previous PageTable Of Contents../index.htmlIndexNext Page

fx_stopch( )

Description | Cautions | Example | Errors | See Also

Name:

int fx_stopch(dev, mode)

Inputs:

int dev

valid Dialogic fax channel device handle

unsigned short mode

synchronous/asynchronous mode bitmap

Returns:

0 if success

-1 if failure

Includes:

srllib.h

dxxxlib.h

faxlib.h

Category:

resource management

Mode:

synchronous/asynchronous

 

Top Of PageDescription

The fx_stopch( ) function forces termination of a fax send or receive on a fax channel device. It forces a fax channel in the busy state to become idle.

If the fax channel specified in dev is already idle, fx_stopch( ) has no effect and returns a success.

A fx_stopch( ) function issued on a channel executing the T.30 fax protocol for either send or receive will disconnect the fax transfer and enter Phase E of the T.30 fax protocol to terminate the fax transfer. The active send or receive function returns a -1. ATDV_LASTERR( ) returns EFX_DISCONNECT and ATFX_ESTAT( ) returns EFX_ABORTCMD.

NOTE:
It may take a few seconds after fx_stopch( ) returns before termination takes effect. The timing depends on the phase of the fax transfer at the time fx_stopch( ) is issued.

 

Parameter

Description

dev

Specifies the valid fax channel device handle obtained when the channel was opened.

mode

Specifies the mode of operation.

 

EV_SYNC

Synchronous mode (default).

The function does not return to the application until the fax channel device is idle.

 

EV_ASYNC

Asynchronous mode.

The function immediately returns after initiating a stop on the fax channel device.

If you issue the fx_stopch( ) function from an event handler, you must call fx_stopch( ) in asynchronous mode (EV_ASYNC).

See the Voice Software Reference - Standard Runtime Library for information on event handlers.

Top Of PageCautions

Dialogic recommends that you use fx_stopch( ) to stop fax I/O only after a fax send or receive function has been issued.

Top Of PageExample

Top Of PageErrors

If this function returns -1 to indicate failure, use ATDV_LASTERR( ) and ATDV_ERRMSGP( ) to retrieve one of the following error reasons:

 

EDX_BADPARM

Invalid fax parameter

EDX_SYSTEM

Operating system error; use dx_fileerrno( ) to obtain error value.

Top Of PageSee Also


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

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