-strncasecmp for the win

This commit is contained in:
Christian Grothoff 2021-08-05 21:23:29 +02:00
parent bd7e44720b
commit 40b828ba23
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -1,6 +1,6 @@
/* /*
This file is part of TALER This file is part of TALER
Copyright (C) 2017-2020 Taler Systems SA Copyright (C) 2017-2021 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software terms of the GNU General Public License as published by the Free Software
@ -650,8 +650,9 @@ run (void *cls,
} }
if ( (NULL == auth.wire_gateway_url) || if ( (NULL == auth.wire_gateway_url) ||
(0 == strlen (auth.wire_gateway_url)) || (0 == strlen (auth.wire_gateway_url)) ||
(0 != strcasecmp ("http", (0 != strncasecmp ("http",
auth.wire_gateway_url)) ) auth.wire_gateway_url,
strlen ("http"))) )
{ {
fprintf (stderr, fprintf (stderr,
"Error: Invalid wire gateway URL `%s' configured.\n", "Error: Invalid wire gateway URL `%s' configured.\n",