gc_ErrorValue( )
Termination Events | Cautions | Errors | Example | See Also
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.
Termination Events
Cautions
- To aid in debugging, both the gc_errorp and the cclib_errorp values should be retrieved.
- The gc_ErrorValue( ) function can be called only in the same thread in which the routine in error was called. The function is "thread-safe" and it gets the value from thread-safe memory. The gc_ErrorValue( ) function cannot be called to retrieve the error value for a function that returned an error in another thread.
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
Click here to contact Telecom Support Resources
Copyright 2003, Intel Corporation