Skip to content

Commit 790a390

Browse files
committed
mk_sip_req(): Properly init the sip_msg
This way, parse_headers() will work as expected
1 parent 0837c1f commit 790a390

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/ut.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ int mk_sip_req(const char *method, const char *ruri, struct sip_msg *msg)
5656
ruri, rand(), rand(), rand(), rand(), (int)strlen(body), body);
5757

5858
memset(msg, 0, sizeof *msg);
59+
msg->buf = msgbuf;
60+
msg->len = len;
61+
msg->ruri_q = Q_UNSPECIFIED;
62+
5963
if (parse_msg(msgbuf, len, msg) != 0) {
6064
LM_ERR("failed to parse test msg\n");
6165
return -1;

0 commit comments

Comments
 (0)