Skip to content

Commit

Permalink
Properly use the RR param cookie
Browse files Browse the repository at this point in the history
Reported by jrudolph
  • Loading branch information
vladpaiu committed May 24, 2013
1 parent cbca092 commit 52325ad
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions modules/dialog/dlg_tophiding.c
Expand Up @@ -37,6 +37,7 @@
#include "dlg_handlers.h"

extern struct tm_binds d_tmb;
extern char * rr_param;

#define RECORD_ROUTE "Record-Route: "
#define RECORD_ROUTE_LEN (sizeof(RECORD_ROUTE)-1)
Expand Down Expand Up @@ -77,7 +78,7 @@ int dlg_replace_contact(struct sip_msg* msg, struct dlg_cell* dlg)
{
// str local_contact;
struct lump* lump, *crt, *prev_crt =0, *a, *foo;
int offset;
int offset,rr_param_len;
int len,n;
char *prefix=NULL,*suffix=NULL,*p,*p_init;
int prefix_len,suffix_len;
Expand Down Expand Up @@ -111,8 +112,9 @@ int dlg_replace_contact(struct sip_msg* msg, struct dlg_cell* dlg)

p_init = p = suffix;
*p++ = ';';
memcpy(p,"did",3);
p+=3;
rr_param_len = strlen(rr_param);
memcpy(p,rr_param,rr_param_len);
p+=rr_param_len;
*p++ = '=';

n = RR_DLG_PARAM_SIZE - (p-p_init);
Expand Down

0 comments on commit 52325ad

Please sign in to comment.