diff libsip/out_msg.c @ 81:915f0f397fb6

sip-in: beginning of outgoing BYE support
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 20 Sep 2022 20:11:44 -0800
parents 5427b26525cd
children
line wrap: on
line diff
--- a/libsip/out_msg.c	Tue Sep 20 19:35:34 2022 -0800
+++ b/libsip/out_msg.c	Tue Sep 20 20:11:44 2022 -0800
@@ -22,6 +22,21 @@
 	return(0);
 }
 
+start_request_out_msg_urilen(msg, method, uri, uri_len)
+	struct sip_msg_out *msg;
+	char *method, *uri;
+	unsigned uri_len;
+{
+	unsigned len;
+
+	len = strlen(method) + uri_len + (2 + 7 + 2);
+	if (len + 2 > MAX_SIP_TX_PACKET)
+		return(-1);
+	sprintf(msg->buf, "%s %.*s SIP/2.0\r\n", method, uri_len, uri);
+	msg->msg_len = len;
+	return(0);
+}
+
 start_response_out_msg(msg, status)
 	struct sip_msg_out *msg;
 	char *status;