gaaf commented on this pull request.
@@ -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 );
It is not necessarily decreased, it is just realloc'ed to the size of the new tag,
which may be bigger or smaller.
The tag is not "changed" it is stored untouched from the incoming response.
There may be multiple to-tag's in a single dialog as the call may have been forked.
The dialog module does not track individual branches separately, it just stores 1 of them,
we just hope it is the correct one. When storing the tag of the 200 OK, it may be
overwriting a previous tag (from a 1XX response).
--
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#discussion_r303429055