changeset 44:30572642e853

libsip/primary_parse.c: SIP-Version is case-insensitive per RFC 3261
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 05 Sep 2022 10:37:36 -0800
parents 5995660dcbac
children f1cf80c7e243
files libsip/primary_parse.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libsip/primary_parse.c	Sun Sep 04 21:38:02 2022 -0800
+++ b/libsip/primary_parse.c	Mon Sep 05 10:37:36 2022 -0800
@@ -42,7 +42,7 @@
 try_status_line(msg)
 	struct sip_pkt_rx *msg;
 {
-	if (strncmp(msg->pkt_buffer, "SIP/2.0 ", 8))
+	if (strncasecmp(msg->pkt_buffer, "SIP/2.0 ", 8))
 		return(0);
 	if (!isdigit(msg->pkt_buffer[8]))
 		return(0);
@@ -78,7 +78,7 @@
 	if (*cp != ' ')
 		return(0);
 	*cp++ = '\0';
-	if (strcmp(cp, "SIP/2.0"))
+	if (strcasecmp(cp, "SIP/2.0"))
 		return(0);
 	else
 		return(1);