[sr-dev] [kamailio/kamailio] dialog: Add setting to loop BYE through proxy (#1832)
Henning Westerholt
notifications at github.com
Mon Feb 18 22:49:52 CET 2019
henningw commented on this pull request.
>From the code change all looks fine to me. I've added some comments inline about a few things I noticed.
> @@ -528,7 +533,7 @@ int dlg_set_leg_info(struct dlg_cell *dlg, str* tag, str *rr, str *contact,
if(dlg->tag[leg].s)
shm_free(dlg->tag[leg].s);
- dlg->tag[leg].s = (char*)shm_malloc( tag->len + rr->len );
Why you decrease here the shm malloc'ed area, do you change something in the tag as well?
> @@ -269,6 +271,25 @@ int populate_leg_info( struct dlg_cell *dlg, struct sip_msg *msg,
if (rr_set.s) pkg_free(rr_set.s);
This free is in current git master at the end of this function and seems redundant now. Maybe it make sense to combine it with the other free in line 290 and move it to the end of the function?
> + /* skip_recs contains the number of RR's for the callee */
+ skip_recs -= own_rr;
+ /* Add local RR's to caller's routeset */
+ if( print_rr_body(msg->record_route, &rr_set, DLG_CALLER_LEG,
+ &skip_recs) != 0) {
+ LM_ERR("failed to print route records \n");
+ goto error0;
+ }
+ LM_DBG("updating caller route_set %.*s\n",
+ rr_set.len, rr_set.s);
+ if (dlg_update_rr_set( dlg, DLG_CALLER_LEG, &rr_set)!=0) {
+ LM_ERR("dlg_update_rr_set failed\n");
+ if (rr_set.s) pkg_free(rr_set.s);
+ goto error0;
+ }
+ if (rr_set.s) pkg_free(rr_set.s);
see above
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1832#pullrequestreview-204957921
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20190218/04f0ccfb/attachment.html>
More information about the sr-dev
mailing list