rename TIP_CLIENT_NOTIFY_REDIRECT to TIP_CLIENT_POST_REDIRECT

master
tiptorrent development team 2021-12-23 18:20:37 +01:00
parent 85ff3e5d57
commit be1b23b5f9
1 changed files with 4 additions and 4 deletions

View File

@ -42,7 +42,7 @@ struct ev_loop *tip_main_loop;
enum {
TIP_CLIENT_GET_HEADER,
TIP_CLIENT_GET_PAYLOAD,
TIP_CLIENT_NOTIFY_REDIRECT,
TIP_CLIENT_POST_REDIRECT,
TIP_CLIENT_DONE,
};
@ -239,7 +239,7 @@ static int tip_client_state_recv_payload(struct tip_client *cli)
if (cli->redirected) {
tip_client_close(cli);
tip_client_connect(addr);
cli->state = TIP_CLIENT_NOTIFY_REDIRECT;
cli->state = TIP_CLIENT_POST_REDIRECT;
return 1;
}
@ -313,7 +313,7 @@ static void tip_client_read_cb(struct ev_loop *loop, struct ev_io *io, int event
if (ret == 0)
goto close;
break;
case TIP_CLIENT_NOTIFY_REDIRECT:
case TIP_CLIENT_POST_REDIRECT:
ret = tip_client_state_notify_redirect(cli);
if (ret < 0)
goto error;
@ -353,7 +353,7 @@ static void tip_client_connect_cb(struct ev_loop *loop, struct ev_io *io, int ev
syslog(LOG_INFO, "connected to %s to fetch file %s\n", addr, filename);
if (cli->state == TIP_CLIENT_NOTIFY_REDIRECT)
if (cli->state == TIP_CLIENT_POST_REDIRECT)
snprintf(buf, sizeof(buf), "POST /%s HTTP/1.1\r\n\r\n", filename);
else
snprintf(buf, sizeof(buf), "GET /%s HTTP/1.1\r\n\r\n", filename);