Ignore:
Timestamp:
Feb 9, 2006 12:13:40 AM (18 years ago)
Author:
bennylp
Message:

Integration of pjmedia and pjsip error subsystem to pjlib

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip/sip_endpoint.c

    r145 r162  
    107107extern pjsip_module mod_stateful_util; 
    108108 
     109 
     110/* Specifies whether error subsystem has been registered to pjlib. */ 
     111static int error_subsys_initialized; 
     112 
     113/** 
     114 * Defined in sip_errno.c 
     115 * 
     116 * Get error message for the specified error code. This can only get 
     117 * PJSIP specific error message. To get all types of error message, 
     118 * use pj_strerror() instead. 
     119 * 
     120 * @param status    The error code. 
     121 * @param buffer    The buffer where to put the error message. 
     122 * @param bufsize   Size of the buffer. 
     123 * 
     124 * @return          The error message as NULL terminated string, 
     125 *                  wrapped with pj_str_t. 
     126 */ 
     127PJ_DECL(pj_str_t) pjsip_strerror( pj_status_t status, char *buffer, 
     128                                  pj_size_t bufsize); 
     129 
     130 
    109131/* 
    110132 * This is the global handler for memory allocation failure, for pools that 
     
    394416    pjsip_max_fwd_hdr *mf_hdr; 
    395417    pj_lock_t *lock = NULL; 
     418 
     419 
     420    if (!error_subsys_initialized) { 
     421        pj_register_strerror(PJSIP_ERRNO_START, PJ_ERRNO_SPACE_SIZE, 
     422                             &pjsip_strerror); 
     423        error_subsys_initialized = 1; 
     424    } 
    396425 
    397426    PJ_LOG(5, (THIS_FILE, "Creating endpoint instance...")); 
Note: See TracChangeset for help on using the changeset viewer.