diff mbox series

[V3,13/21] mongoose: Replace deprecated mg_vcmp() with mg_strcmp()

Message ID 20240709111440.8215-14-Michael.Glembotzki@iris-sensing.com
State Accepted
Headers show
Series mongoose: Update to version 7.14 | expand

Commit Message

Michael Glembotzki July 9, 2024, 11:08 a.m. UTC
mongoose rev-id: b46bee0540c83c780ae9622ef18b9cc8a7b3ebab

Signed-off-by: Michael Glembotzki <Michael.Glembotzki@iris-sensing.com>
---
 mongoose/mongoose_interface.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/mongoose/mongoose_interface.c b/mongoose/mongoose_interface.c
index 5a4e98fd..f0c58524 100644
--- a/mongoose/mongoose_interface.c
+++ b/mongoose/mongoose_interface.c
@@ -232,8 +232,8 @@  static int mg_check_digest_auth(struct mg_str method, struct mg_str uri,
 	 */
 	while (fgets(buf, sizeof(buf), fp) != NULL) {
 		if (sscanf(buf, "%[^:]:%[^:]:%s", f_user, f_domain, f_ha1) == 3 &&
-			mg_vcmp(&username, f_user) == 0 &&
-			mg_vcmp(&auth_domain, f_domain) == 0) {
+			mg_strcmp(username, mg_str(f_user)) == 0 &&
+			mg_strcmp(auth_domain, mg_str(f_domain)) == 0) {
 			/* Username and domain matched, check the password */
 			mg_mkmd5resp(method, uri, mg_str_s(f_ha1), nonce, nc, cnonce, qop, exp_resp);
 			return strncmp(response.buf, exp_resp, strlen(exp_resp)) == 0;