Skip to content

Commit

Permalink
Merge pull request #3262 from jes/jes/topology-hiding-fix
Browse files Browse the repository at this point in the history
topology_hiding: fix encoded Contact length calculation

(cherry picked from commit da20b22)
  • Loading branch information
bogdan-iancu committed Feb 13, 2024
1 parent 45d8d21 commit 0f46cdd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/topology_hiding/topo_hiding_logic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1618,7 +1618,7 @@ static char* build_encoded_contact_suffix(struct sip_msg* msg,int *suffix_len)
/* we just iterate over the unknown params */
for (i=0;i<ctu.u_params_no;i++) {
if (str_match(&el->param_name, &ctu.u_name[i]))
suffix_len += topo_ct_param_len(&ctu.u_name[i], &ctu.u_val[i], 0);
total_len += topo_ct_param_len(&ctu.u_name[i], &ctu.u_val[i], 0);
}
}
}
Expand All @@ -1634,7 +1634,7 @@ static char* build_encoded_contact_suffix(struct sip_msg* msg,int *suffix_len)
for (el=th_hdr_param_list;el;el=el->next) {
for (it=((contact_body_t *)msg->contact->parsed)->contacts->params;it;it=it->next) {
if (str_match(&el->param_name, &it->name))
suffix_len += topo_ct_param_len(&it->name, &it->body, 1);
total_len += topo_ct_param_len(&it->name, &it->body, 1);
}
}
}
Expand Down

0 comments on commit 0f46cdd

Please sign in to comment.