Skip to content

Commit

Permalink
- fixed updating the index of the last DEL operation - this is essent…
Browse files Browse the repository at this point in the history
…ial for deciding which lumps must be skipped (as overlapping with delete parts of the message)

  Credits go to Nick Altmann for reporting and helping with troubleshooting.
  Closes issue #79
  • Loading branch information
bogdan-iancu committed Sep 20, 2013
1 parent c5a57a8 commit 7938941
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions msg_translator.c
Expand Up @@ -646,7 +646,6 @@ int lumps_len(struct sip_msg* msg, struct lump* lumps,
LM_CRIT("invalid op for data lump (%x)\n", r->op);
}
}
LM_DBG("new len is %d after before\n",new_len);
skip_before:
if (only_before)
continue;
Expand All @@ -672,7 +671,6 @@ int lumps_len(struct sip_msg* msg, struct lump* lumps,
default:
LM_CRIT("op for data lump (%x)\n", r->op);
}
LM_DBG("new len is %d after main\n",new_len);
for (r=t->after;r;r=r->after){
switch(r->op){
case LUMP_ADD:
Expand All @@ -697,7 +695,6 @@ int lumps_len(struct sip_msg* msg, struct lump* lumps,
LM_CRIT("invalid op for data lump (%x)\n", r->op);
}
}
LM_DBG("new len is %d after after\n",new_len);
skip_after:
; /* to make gcc 3.* happy */
}
Expand Down Expand Up @@ -1067,9 +1064,9 @@ void process_lumps( struct sip_msg* msg,
memcpy(new_buf+offset, orig+s_offset,size);
offset+=size;
s_offset+=size;
if (t->op==LUMP_DEL)
last_del=t->u.offset;
}
if (t->op==LUMP_DEL)
last_del=t->u.offset;
/* process before */
for(r=t->before;r;r=r->before){
switch (r->op){
Expand Down

0 comments on commit 7938941

Please sign in to comment.