Skip to content

Commit

Permalink
Fix the building of RR param holding the dialog ID
Browse files Browse the repository at this point in the history
Closes #2148
  • Loading branch information
bogdan-iancu committed Jun 23, 2020
1 parent b4cd132 commit b2c37f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/dialog/dlg_handlers.c
Expand Up @@ -90,7 +90,7 @@ static int dlg_get_did_buf(struct dlg_cell *dlg, str *buf)
return -1;

if (!buf->len)
return 01;
return -1;

*(p++) = DLG_SEPARATOR;
buf->len--;
Expand Down Expand Up @@ -168,6 +168,8 @@ static inline int add_dlg_rr_param(struct sip_msg *req, struct dlg_cell *dlg)
if (dlg_get_did_buf(dlg, &id) < 0)
return -1;

id.len += p - buf;
id.s -= p - buf;
if (d_rrb.add_rr_param( req, &id)<0) {
LM_ERR("failed to add rr param\n");
return -1;
Expand Down

0 comments on commit b2c37f7

Please sign in to comment.