Ignore:
Timestamp:
Mar 17, 2006 5:57:52 PM (18 years ago)
Author:
bennylp
Message:

Changed pjsip_inv_send_msg() function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c

    r315 r324  
    3434#define THIS_FILE       "sip_invite_session.c" 
    3535 
     36static const char *inv_state_names[] = 
     37{ 
     38    "NULL      ", 
     39    "CALLING   ", 
     40    "INCOMING  ", 
     41    "EARLY     ", 
     42    "CONNECTING", 
     43    "CONFIRMED ", 
     44    "DISCONNCTD", 
     45    "TERMINATED", 
     46}; 
     47 
    3648/* 
    3749 * Static prototypes. 
     
    6779    pjsip_endpoint      *endpt; 
    6880    pjsip_inv_callback   cb; 
    69     pjsip_module        *app_user; 
    7081} mod_inv =  
    7182{ 
     
    317328 */ 
    318329PJ_DEF(pj_status_t) pjsip_inv_usage_init( pjsip_endpoint *endpt, 
    319                                           pjsip_module *app_module, 
    320330                                          const pjsip_inv_callback *cb) 
    321331{ 
     
    323333 
    324334    /* Check arguments. */ 
    325     PJ_ASSERT_RETURN(endpt && app_module && cb, PJ_EINVAL); 
     335    PJ_ASSERT_RETURN(endpt && cb, PJ_EINVAL); 
    326336 
    327337    /* Some callbacks are mandatory */ 
     
    335345 
    336346    mod_inv.endpt = endpt; 
    337     mod_inv.app_user = app_module; 
    338347 
    339348    /* Register the module. */ 
     
    361370} 
    362371 
     372 
     373/* 
     374 * Get INVITE state name. 
     375 */ 
     376PJ_DEF(const char *) pjsip_inv_state_name(pjsip_inv_state state) 
     377{ 
     378    PJ_ASSERT_RETURN(state >= PJSIP_INV_STATE_NULL &&  
     379                     state <= PJSIP_INV_STATE_DISCONNECTED, 
     380                     "??"); 
     381 
     382    return inv_state_names[state]; 
     383} 
    363384 
    364385/* 
     
    15491570 */ 
    15501571PJ_DEF(pj_status_t) pjsip_inv_send_msg( pjsip_inv_session *inv, 
    1551                                         pjsip_tx_data *tdata, 
    1552                                         void *token ) 
     1572                                        pjsip_tx_data *tdata) 
    15531573{ 
    15541574    pj_status_t status; 
     
    15721592 
    15731593        tsx->mod_data[mod_inv.mod.id] = tsx_inv_data; 
    1574         tsx->mod_data[mod_inv.app_user->id] = token; 
    15751594 
    15761595    } else { 
     
    17181737        } else { 
    17191738            /* Re-send BYE. */ 
    1720             status = pjsip_inv_send_msg(inv, tdata, NULL ); 
     1739            status = pjsip_inv_send_msg(inv, tdata); 
    17211740        } 
    17221741 
     
    18521871 
    18531872                    /* Send the request. */ 
    1854                     status = pjsip_inv_send_msg(inv, tdata, NULL ); 
     1873                    status = pjsip_inv_send_msg(inv, tdata); 
    18551874                } 
    18561875 
     
    22722291                return; 
    22732292 
    2274             status = pjsip_inv_send_msg(inv, tdata, NULL); 
     2293            status = pjsip_inv_send_msg(inv, tdata); 
    22752294 
    22762295        } 
     
    23112330 
    23122331            /* Send re-INVITE */ 
    2313             status = pjsip_inv_send_msg( inv, tdata, NULL); 
     2332            status = pjsip_inv_send_msg( inv, tdata); 
    23142333 
    23152334        } else if (tsx->status_code==PJSIP_SC_CALL_TSX_DOES_NOT_EXIST || 
Note: See TracChangeset for help on using the changeset viewer.