Skip to content

Commit

Permalink
speeddial: fix stripping domain prefix
Browse files Browse the repository at this point in the history
- increment the index after the value is adjusted

(cherry picked from commit 6861995)
(cherry picked from commit 7829be6)
  • Loading branch information
miconda committed Jan 28, 2020
1 parent bef3471 commit 0471636
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/speeddial/sdlookup.c
Expand Up @@ -117,7 +117,6 @@ int sd_lookup_owner(sip_msg_t* _msg, str* stable, str* sowner)
db_vals[nr_keys].nul = 0;
db_vals[nr_keys].val.str_val.s = puri->host.s;
db_vals[nr_keys].val.str_val.len = puri->host.len;
nr_keys++;

if (dstrip_s.s!=NULL && dstrip_s.len>0
&& dstrip_s.len<puri->host.len
Expand All @@ -126,6 +125,7 @@ int sd_lookup_owner(sip_msg_t* _msg, str* stable, str* sowner)
db_vals[nr_keys].val.str_val.s += dstrip_s.len;
db_vals[nr_keys].val.str_val.len -= dstrip_s.len;
}
nr_keys++;
}
/* take sd from r-uri */
if (parse_sip_msg_uri(_msg) < 0)
Expand Down

0 comments on commit 0471636

Please sign in to comment.