Skip to content

Commit

Permalink
sip: add host param to sip_send_conn
Browse files Browse the repository at this point in the history
fixes #1140 - Stateless SIP requests with TLS transport fail with EINVAL
  • Loading branch information
sreimers committed Jun 11, 2024
1 parent b465775 commit ca824b5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/re_sip.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ int sip_debug(struct re_printf *pf, const struct sip *sip);
int sip_send(struct sip *sip, void *sock, enum sip_transp tp,
const struct sa *dst, struct mbuf *mb);
int sip_send_conn(struct sip *sip, void *sock, enum sip_transp tp,
const struct sa *dst, struct mbuf *mb,
const struct sa *dst, char *host, struct mbuf *mb,
sip_conn_h *connh, void *arg);
void sip_set_trace_handler(struct sip *sip, sip_trace_h *traceh);

Expand Down
2 changes: 1 addition & 1 deletion src/sip/request.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ static int request(struct sip_request *req, enum sip_transp tp,
}

if (!req->stateful) {
err = sip_send_conn(req->sip, NULL, tp, dst, mb,
err = sip_send_conn(req->sip, NULL, tp, dst, req->host, mb,
connect_handler, req);
}
else {
Expand Down
4 changes: 2 additions & 2 deletions src/sip/sip.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,10 @@ void sip_close(struct sip *sip, bool force)
* @return 0 if success, otherwise errorcode
*/
int sip_send_conn(struct sip *sip, void *sock, enum sip_transp tp,
const struct sa *dst, struct mbuf *mb,
const struct sa *dst, char *host, struct mbuf *mb,
sip_conn_h *connh, void *arg)
{
return sip_transp_send(NULL, sip, sock, tp, dst, NULL, mb, connh, NULL,
return sip_transp_send(NULL, sip, sock, tp, dst, host, mb, connh, NULL,
arg);
}

Expand Down

0 comments on commit ca824b5

Please sign in to comment.