Skip to content

Commit 47a5d9a

Browse files
authored
sip: add host param to sip_send_conn (#1141)
fixes #1140 - Stateless SIP requests with TLS transport fail with EINVAL
1 parent b465775 commit 47a5d9a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

include/re_sip.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ int sip_debug(struct re_printf *pf, const struct sip *sip);
303303
int sip_send(struct sip *sip, void *sock, enum sip_transp tp,
304304
const struct sa *dst, struct mbuf *mb);
305305
int sip_send_conn(struct sip *sip, void *sock, enum sip_transp tp,
306-
const struct sa *dst, struct mbuf *mb,
306+
const struct sa *dst, char *host, struct mbuf *mb,
307307
sip_conn_h *connh, void *arg);
308308
void sip_set_trace_handler(struct sip *sip, sip_trace_h *traceh);
309309

src/sip/request.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ static int request(struct sip_request *req, enum sip_transp tp,
233233
}
234234

235235
if (!req->stateful) {
236-
err = sip_send_conn(req->sip, NULL, tp, dst, mb,
236+
err = sip_send_conn(req->sip, NULL, tp, dst, req->host, mb,
237237
connect_handler, req);
238238
}
239239
else {

src/sip/sip.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,10 @@ void sip_close(struct sip *sip, bool force)
210210
* @return 0 if success, otherwise errorcode
211211
*/
212212
int sip_send_conn(struct sip *sip, void *sock, enum sip_transp tp,
213-
const struct sa *dst, struct mbuf *mb,
213+
const struct sa *dst, char *host, struct mbuf *mb,
214214
sip_conn_h *connh, void *arg)
215215
{
216-
return sip_transp_send(NULL, sip, sock, tp, dst, NULL, mb, connh, NULL,
216+
return sip_transp_send(NULL, sip, sock, tp, dst, host, mb, connh, NULL,
217217
arg);
218218
}
219219

0 commit comments

Comments
 (0)