Skip to content

Commit 307a986

Browse files
committed
Revert "tm: fix bogus contact built without domain"
This reverts commit de50249.
1 parent 3d0959a commit 307a986

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

modules/tm/t_msgbuilder.h

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ static inline int fix_fake_req_headers(struct sip_msg *req)
140140
struct hdr_field *hdr;
141141
struct lump *ld, *la;
142142
contact_t *c;
143-
int enclosed;
144143

145144
if (clone_headers(req, req) < 0) {
146145
LM_ERR("could not clone headers list!\n");
@@ -169,16 +168,10 @@ static inline int fix_fake_req_headers(struct sip_msg *req)
169168
la->type, ld->u.offset, ld->len,
170169
(int)(c->uri.s-req->buf), c->uri.len); */
171170
if (la->op == LUMP_ADD && la->type == HDR_CONTACT_T &&
172-
ld->u.offset == c->uri.s-req->buf) {
173-
/* if we don't have the same length as the URI was
174-
* initially pointing (excluding quotes), then this is
175-
* not the actual URI
176-
*/
177-
enclosed = (la->len > 2 && la->u.value[0] == '<');
178-
if (la->len != (c->uri.len + (enclosed?2:0)))
179-
continue;
171+
ld->u.offset == c->uri.s-req->buf &&
172+
ld->len == c->uri.len) {
180173
/* if enclosed, skip enclosing */
181-
if (enclosed) {
174+
if (la->u.value[0] == '<') {
182175
c->uri.s = la->u.value + 1;
183176
c->uri.len = la->len - 2;
184177
} else {

0 commit comments

Comments
 (0)