diff libsip/primary_parse.c @ 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 77d980126efd
children f1cf80c7e243
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);