Ignore:
Timestamp:
Nov 27, 2008 12:42:07 PM (15 years ago)
Author:
bennylp
Message:

More ticket #10: changed to signature of the redirection callbacks to make it more natural to use

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c

    r2370 r2371  
    6969 * Redirection handler. 
    7070 */ 
    71 static void pjsua_call_on_redirected(pjsip_inv_session *inv,  
    72                                      const pjsip_uri *target, 
    73                                      pjsip_redirect_op *cmd,  
    74                                      const pjsip_event *e); 
     71static pjsip_redirect_op pjsua_call_on_redirected(pjsip_inv_session *inv, 
     72                                                  const pjsip_uri *target, 
     73                                                  const pjsip_event *e); 
    7574 
    7675 
     
    38153814 
    38163815/* Redirection handler */ 
    3817 static void pjsua_call_on_redirected(pjsip_inv_session *inv,  
    3818                                      const pjsip_uri *target, 
    3819                                      pjsip_redirect_op *cmd,  
    3820                                      const pjsip_event *e) 
     3816static pjsip_redirect_op pjsua_call_on_redirected(pjsip_inv_session *inv, 
     3817                                                  const pjsip_uri *target, 
     3818                                                  const pjsip_event *e) 
    38213819{ 
    38223820    pjsua_call *call = (pjsua_call*) inv->dlg->mod_data[pjsua_var.mod.id]; 
     3821    pjsip_redirect_op op; 
    38233822 
    38243823    PJSUA_LOCK(); 
    38253824 
    38263825    if (pjsua_var.ua_cfg.cb.on_call_redirected) { 
    3827         (*pjsua_var.ua_cfg.cb.on_call_redirected)(call->index, target, cmd, e); 
     3826        op = (*pjsua_var.ua_cfg.cb.on_call_redirected)(call->index,  
     3827                                                         target, e); 
    38283828    } else { 
    38293829        PJ_LOG(4,(THIS_FILE, "Unhandled redirection for call %d " 
     
    38313831                  "call.", 
    38323832                  call->index)); 
    3833         *cmd = PJSIP_REDIRECT_STOP; 
     3833        op = PJSIP_REDIRECT_STOP; 
    38343834    } 
    38353835 
    38363836    PJSUA_UNLOCK(); 
    3837 } 
    3838  
     3837 
     3838    return op; 
     3839} 
     3840 
Note: See TracChangeset for help on using the changeset viewer.