diff options
author | Benny Prijono <bennylp@teluu.com> | 2008-11-27 12:42:07 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2008-11-27 12:42:07 +0000 |
commit | aa39a64bb0d43467eeceecf9759473135be09751 (patch) | |
tree | 7184fa543358b6c843ebfde889ee83a5cb6800fa /pjsip/src/pjsua-lib | |
parent | c40accaad90c1ec16cf734e478d13247812c0e0c (diff) |
More ticket #10: changed to signature of the redirection callbacks to make it more natural to use
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2371 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsua-lib')
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_call.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c index 6831487d..5b6b8e66 100644 --- a/pjsip/src/pjsua-lib/pjsua_call.c +++ b/pjsip/src/pjsua-lib/pjsua_call.c @@ -68,10 +68,9 @@ static void pjsua_call_on_tsx_state_changed(pjsip_inv_session *inv, /* * Redirection handler. */ -static void pjsua_call_on_redirected(pjsip_inv_session *inv, - const pjsip_uri *target, - pjsip_redirect_op *cmd, - const pjsip_event *e); +static pjsip_redirect_op pjsua_call_on_redirected(pjsip_inv_session *inv, + const pjsip_uri *target, + const pjsip_event *e); /* Create SDP for call hold. */ @@ -3814,25 +3813,28 @@ static void pjsua_call_on_tsx_state_changed(pjsip_inv_session *inv, /* Redirection handler */ -static void pjsua_call_on_redirected(pjsip_inv_session *inv, - const pjsip_uri *target, - pjsip_redirect_op *cmd, - const pjsip_event *e) +static pjsip_redirect_op pjsua_call_on_redirected(pjsip_inv_session *inv, + const pjsip_uri *target, + const pjsip_event *e) { pjsua_call *call = (pjsua_call*) inv->dlg->mod_data[pjsua_var.mod.id]; + pjsip_redirect_op op; PJSUA_LOCK(); if (pjsua_var.ua_cfg.cb.on_call_redirected) { - (*pjsua_var.ua_cfg.cb.on_call_redirected)(call->index, target, cmd, e); + op = (*pjsua_var.ua_cfg.cb.on_call_redirected)(call->index, + target, e); } else { PJ_LOG(4,(THIS_FILE, "Unhandled redirection for call %d " "(callback not implemented by application). Disconnecting " "call.", call->index)); - *cmd = PJSIP_REDIRECT_STOP; + op = PJSIP_REDIRECT_STOP; } PJSUA_UNLOCK(); + + return op; } |