@gaaf commented on this pull request.


In src/modules/dialog/dlg_hash.c:

> @@ -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, view it on GitHub, or mute the thread.