From 8fa7bcb9ce4550c978f99bc7aaed21fdf7e28e7e Mon Sep 17 00:00:00 2001 From: Vlad Paiu Date: Thu, 22 Aug 2024 18:34:37 +0300 Subject: [PATCH] Fix comparision of SIP URIs, add GR and PN related params checks --- parser/msg_parser.h | 3 +++ parser/parse_uri.c | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/parser/msg_parser.h b/parser/msg_parser.h index c7b2fbe1701..165715ab0d8 100644 --- a/parser/msg_parser.h +++ b/parser/msg_parser.h @@ -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 */ diff --git a/parser/parse_uri.c b/parser/parse_uri.c index 4c2fc8feb15..a88d85df474 100644 --- a/parser/parse_uri.c +++ b/parser/parse_uri.c @@ -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,