PREV TOC HOME INDEX NEXT


4.1.3 Checking Return Codes

Most Intel® Dialogic® library functions return a value of -1 if they fail (extended attribute functions return -1 or AT_FAILUREP). Therefore, any call to a library function should check for a return value indicating an error. This can be done by using a format similar to the following:

/* call to Intel® Dialogic® MSI/SC library function */  
if (ms_xxx(arguments) == -1) {
    /* error handling routine */
}
/* successful function call -
    continue processing ...  */  

Using this technique ensures that all errors resulting from a library call will be trapped and handled properly by the application. In many cases, you can check for a return value of other than zero (0), however, this should only be used where a nonzero value is returned when the function fails. For details, see Chapter 3, "Error Handling".


PREV TOC HOME INDEX NEXT

Click here to contact Telecom Support Resources

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