Skip to content

Commit

Permalink
Fix comparision of SIP URIs, add GR and PN related params checks
Browse files Browse the repository at this point in the history
(cherry picked from commit 8fa7bcb)
  • Loading branch information
vladpaiu authored and liviuchircu committed Aug 22, 2024
1 parent c62900e commit af86be2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions parser/msg_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ struct sip_uri {
str pn_prid_val;
str pn_param_val;
str pn_purr_val;
/* XXX - in the future when adding params as special links
* in the list above, make sure to also update compare_uris() function
* to explicitly compare these here */

/* unknown params */
str u_name[URI_MAX_U_PARAMS]; /* Unknown param names */
Expand Down
5 changes: 5 additions & 0 deletions parser/parse_uri.c
Original file line number Diff line number Diff line change
Expand Up @@ -1818,6 +1818,11 @@ int compare_uris(str *raw_uri_a,struct sip_uri* parsed_uri_a,
compare_uri_val(method_val,strncasecmp);
compare_uri_val(lr_val,strncasecmp);
compare_uri_val(r2_val,strncasecmp);
compare_uri_val(gr_val,strncasecmp);
compare_uri_val(pn_provider_val,strncasecmp);
compare_uri_val(pn_prid_val,strncasecmp);
compare_uri_val(pn_param_val,strncasecmp);
compare_uri_val(pn_purr_val,strncasecmp);

if (first.u_params_no == 0 || second.u_params_no == 0)
/* one URI doesn't have other params,
Expand Down

0 comments on commit af86be2

Please sign in to comment.