PREV TOC HOME INDEX NEXT


gc_ErrorValue( )


Termination Events | Cautions | Errors | Example | See Also

Name: int gc_ErrorValue(gc_errorp, cclibidp, cclib_errorp)
Inputs:

int *gc_errorp

  • location to store Global Call error
 

int *cclibidp

  • location to store call control library ID
 

long *cclib_errorp

  • location to store call control library error description
Returns:

0 if error value successfully retrieved

<0 if fails to retrieve error value

Includes:

gclib.h

gcerr.h

Category:

system controls and tools

Mode:

synchronous

Platform and Technology:

All

See the Global Call Technology User's Guides for additional information.

Description

Note: The gc_ErrorValue( ) function is deprecated in this software release. The suggested equivalent is gc_ErrorInfo( ).

The gc_ErrorValue( ) function gets an error value/failure reason code associated with the last Global Call function call. To retrieve an error, this function must be called immediately after a Global Call function failed. This function returns the Global Call error code, *gc_errorp, as well as the lower level error code associated directly with the call control library, *cclib_errorp. The Global Call error code is a generic error that has a consistent meaning across all call control libraries.

A call control library error may be more specific to the supported technology. These error values provide optimal debugging and troubleshooting for the application developer. For example, a time-out error may occur for multiple reasons when establishing a call. The specific reasons may vary for different network interfaces (ISDN time-out errors differ from those in an R2 MFC protocol). Each of these call control library time-out errors are mapped to EGC_TIMEOUT. However, the specific time-out error detected by the call control library will be available through cclib_errorp.

Parameter

Description

gc_errorp points to the location where the Global Call error code will be stored
cclibidp points to the location to store the identification number of the call control library where the error occurred
cclib_errorp points to the location to store the call control library error description that is uniquely associated to its own library

Termination Events

None

Cautions

Errors

If this function returns <0 to indicate failure, then at least one of its input parameters is NULL.

Example

#include <stdio.h>
#include <srllib.h>
#include <gclib.h>
#include <gcerr.h> 
void print_error_values(void)
{
    int        cclibid;          /* cclib id for gc_ErrorValue() */
    int        gc_error;         /* GlobalCall error code */
    long       cc_error;         /* Call Control Library error code */ 
    char       *msg;             /* points to the error message string */
    char       *lib_name;        /* library name for cclibid */ 
    /* This could be called when any function fails;
     * to print the error values */ 
    if (gc_ErrorValue( &gc_error, &cclibid, &cc_error) == GC_SUCCESS) {
        gc_ResultMsg( LIBID_GC, (long) gc_error, &msg);
                    /* GlobalCall errors will return an integer for the print error value. */
        printf("GlobalCall error 0x%lx - %s\n", gc_error, msg);
        gc_ResultMsg( cclibid, cc_error, &msg);
        gc_CCLibIDToName(cclibid, &lib_name);
        printf("%s library had error 0x%lx - %s\n", lib_name, cc_error, msg);
    } else {
        printf("Could not get error value\n");
    }
} 

See Also


PREV TOC HOME INDEX NEXT

Click here to contact Telecom Support Resources

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