(cherry picked from commit 0ed1282238da6cdd8a4dbef1b61493b70a850a6b)
... | ... |
@@ -160,9 +160,9 @@ static inline unsigned int dlg2hash( dlg_t* dlg ) |
160 | 160 |
} |
161 | 161 |
|
162 | 162 |
/** |
163 |
- * refresh hdr shortcuts inside new buffer |
|
163 |
+ * refresh r-uri and hdr shortcuts inside new buffer |
|
164 | 164 |
*/ |
165 |
-int uac_refresh_hdr_shortcuts(tm_cell_t *tcell, char *buf, int buf_len) |
|
165 |
+int uac_refresh_shortcuts(tm_cell_t *tcell, int branch, char *buf, int buf_len) |
|
166 | 166 |
{ |
167 | 167 |
sip_msg_t lreq; |
168 | 168 |
struct cseq_body *cs; |
... | ... |
@@ -175,6 +175,7 @@ int uac_refresh_hdr_shortcuts(tm_cell_t *tcell, char *buf, int buf_len) |
175 | 175 |
LM_ERR("failed to parse headers in new message\n"); |
176 | 176 |
goto error; |
177 | 177 |
} |
178 |
+ tcell->uac[branch].uri = *GET_RURI(&lreq); |
|
178 | 179 |
tcell->from.s = lreq.from->name.s; |
179 | 180 |
tcell->from.len = lreq.from->len; |
180 | 181 |
tcell->to.s = lreq.to->name.s; |
... | ... |
@@ -541,7 +542,7 @@ static inline int t_uac_prepare(uac_req_t *uac_r, |
541 | 542 |
if (unlikely(refresh_shortcuts==E_DROP)) { |
542 | 543 |
ret=E_DROP; |
543 | 544 |
goto error1; |
544 |
- } |
|
545 |
+ } |
|
545 | 546 |
} |
546 | 547 |
#endif |
547 | 548 |
|
... | ... |
@@ -576,7 +577,7 @@ static inline int t_uac_prepare(uac_req_t *uac_r, |
576 | 577 |
request->buffer = buf; |
577 | 578 |
request->buffer_len = buf_len; |
578 | 579 |
if(unlikely(refresh_shortcuts==1)) { |
579 |
- if(uac_refresh_hdr_shortcuts(new_cell, buf, buf_len)<0) { |
|
580 |
+ if(uac_refresh_shortcuts(new_cell, 0, buf, buf_len)<0) { |
|
580 | 581 |
LM_ERR("failed to refresh header shortcuts\n"); |
581 | 582 |
goto error1; |
582 | 583 |
} |