SIPp/sipp — pull request #89 by wdoekes (2014-09-21 12:05:22+00:00)
Title: Fix get_peer_tag behaviour by altering sip parsing.

The get_peer_tag parsing was broken:

Example 1:

To: test;tag=bla

Example 2:

To: test;tag=bla
Other-Header:

The peer tag would not get read for example 1 because of funky parsing:

- if `>` was found, then the peer-tag would get read
- while that check was essentially created for `;tag=bla`, it did not do what it was supposed to:

ptr = strchr(to_hdr, '>');
/* Skip past LA/RA-quoted addr-spec if any */
if (!ptr) {
return NULL;
}
ptr = strchr(to_hdr, ';'); // not using ptr, but to_hdr

Note: the other parsing functions may need to get altered too, but this is a start that fixes at least this issue. We can improve the other parsing routines later by using the new `internal_*` functions.
Note: uppercase TAG=bla is *not* recognised anymore, see the "case" comment below.
Note: display-names with `;` or `>` in it will still mess up parsing, but that's not new.