summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortiptorrent development team <tiptorrent@soleta.eu>2021-09-17 00:34:02 +0200
committertiptorrent development team <tiptorrent@soleta.eu>2021-09-29 15:48:40 +0200
commitdab82c806f35c671f87ea60087b19e3781b35a29 (patch)
treef6d6a04518bb6ddda610e67204c625b4dbcbece8
parente46be236c79e6ba0c423d0482d41463bd8af299f (diff)
do not shadow global redirect variable
-rw-r--r--src/handler.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/handler.c b/src/handler.c
index 8e81c1f..5bcef6b 100644
--- a/src/handler.c
+++ b/src/handler.c
@@ -57,8 +57,8 @@ int tip_client_state_process_payload(struct tip_client *cli)
const char *trailer, *x_redirect;
bool allow_redirect = true;
char _uri[32], *uri = _uri;
+ char allow_redirect_str[5];
char path[PATH_MAX + 1];
- char redirect[5];
struct stat st;
int err;
@@ -80,8 +80,8 @@ int tip_client_state_process_payload(struct tip_client *cli)
x_redirect = strstr(cli->buf, "X-Accept-Redirect: ");
if (x_redirect &&
- sscanf(x_redirect, "X-Accept-Redirect: %4s", redirect) == 1 &&
- !strncmp(redirect, "off", strlen("off")))
+ sscanf(x_redirect, "X-Accept-Redirect: %4s", allow_redirect_str) == 1 &&
+ !strncmp(allow_redirect_str, "off", strlen("off")))
allow_redirect = false;
trailer = strstr(cli->buf, "\r\n\r\n");