Skip to content

Commit

Permalink
mid_registrar: Avoid redundant del lumps
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuchircu committed Dec 5, 2016
1 parent 8d5c0f7 commit 70d303e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions modules/mid_registrar/save.c
Expand Up @@ -122,9 +122,8 @@ static int trim_to_single_contact(struct sip_msg *msg, str *aor)
return -1;
}

c = ((contact_body_t *)ct->parsed)->contacts;

for (c = get_first_contact(msg); c; c = get_next_contact(c)) {
for (c = ((contact_body_t *)ct->parsed)->contacts; c;
c = get_next_contact(c)) {
LM_DBG("deleting Contact '%.*s'\n", c->len, c->name.s);
anchor = del_lump(msg, c->name.s - msg->buf, c->len, HDR_CONTACT_T);
if (!anchor)
Expand Down

0 comments on commit 70d303e

Please sign in to comment.