[sr-dev] git:tmp/ims_charging: Bug-Fixes:
Daniel-Constantin Mierla
miconda at gmail.com
Thu Sep 5 19:44:15 CEST 2013
Don't forget to prefix the first line with the component name (in this
case the name of the module), as instrucuted in the guidelines:
- http://www.kamailio.org/wiki/devel/git-commit-guidelines#commit_message
All other developers use this format and the commit logs are used to
generate the ChangeLog for each release, and it would be good to be
coherent. Also, it give an indication at a glance what parts are affected.
Cheers,
Daniel
On 9/5/13 7:12 PM, Carsten Bock wrote:
> Module: sip-router
> Branch: tmp/ims_charging
> Commit: 37e63951b2b05875f07a1d30b8352e3f10a99072
> URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=37e63951b2b05875f07a1d30b8352e3f10a99072
>
> Author: Carsten Bock <carsten at ng-voice.com>
> Committer: Carsten Bock <carsten at ng-voice.com>
> Date: Wed Sep 4 18:20:20 2013 +0200
>
> Bug-Fixes:
> - Use P-Asserted-Identity instead of From-Header as User in CCR
> - Store RURI in the ro_session structure (it may have been changed by an Application-Server)
>
> Fixed by: Carlos Ruiz Díaz (carlos at ng-voice.com)
>
> ---
>
> modules/ims_charging/ims_ro.c | 16 ++++++++++++++--
> 1 files changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/modules/ims_charging/ims_ro.c b/modules/ims_charging/ims_ro.c
> index a4f9376..42d1bf6 100644
> --- a/modules/ims_charging/ims_ro.c
> +++ b/modules/ims_charging/ims_ro.c
> @@ -803,7 +803,8 @@ error_no_cca:
> * @returns #CSCF_RETURN_TRUE if OK, #CSCF_RETURN_ERROR on error
> */
> int Ro_Send_CCR(struct sip_msg *msg, str* direction, str* charge_type, str* unit_type, int reservation_units) {
> - str session_id = { 0, 0 };
> + str session_id = { 0, 0 },
> + asserted_id = { 0, 0 };
> AAASession* cc_acc_session = NULL;
> Ro_CCR_t * ro_ccr_data = 0;
> AAAMessage * ccr = 0;
> @@ -815,6 +816,11 @@ int Ro_Send_CCR(struct sip_msg *msg, str* direction, str* charge_type, str* unit
> int cc_event_number = 0; //According to IOT tests this should start at 0
> int cc_event_type = RO_CC_START;
>
> + if (msg->first_line.type != SIP_REQUEST) {
> + LM_ERR("Ro_CCR() called from SIP reply.");
> + return -1;
> + }
> +
> //make sure we can get the dialog! if not, we can't continue
> struct dlg_cell* dlg = dlgb.get_dlg(msg);
> if (!dlg) {
> @@ -822,11 +828,17 @@ int Ro_Send_CCR(struct sip_msg *msg, str* direction, str* charge_type, str* unit
> return -1;
> }
>
> + if ((asserted_id = cscf_get_asserted_identity(msg)).len == 0) {
> + LM_DBG("No P-Asserted-Identity hdr found. Using From hdr");
> +
> + asserted_id = dlg->from_uri;
> + }
> +
> dir = get_direction_as_int(direction);
>
> //create a session object without auth and diameter session id - we will add this later.
> new_session = build_new_ro_session(dir, 0, 0, &session_id, &dlg->callid,
> - &dlg->from_uri, &dlg->req_uri, dlg->h_entry, dlg->h_id,
> + &asserted_id, &msg->first_line.u.request.uri, dlg->h_entry, dlg->h_id,
> reservation_units, 0);
> if (!new_session) {
> LM_ERR("Couldn't create new Ro Session - this is BAD!\n");
>
>
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Trainings - Berlin, Oct 21-24; Miami, Nov 11-13, 2013
- more details about Kamailio trainings at http://www.asipto.com -
More information about the sr-dev
mailing list