summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authortiptorrent development team <tiptorrent@soleta.eu>2021-12-23 18:20:32 +0100
committertiptorrent development team <tiptorrent@soleta.eu>2021-12-23 18:20:32 +0100
commit85ff3e5d57fe8d982ef2442788b1507e81611c09 (patch)
treeb472127f2568b09b56d8ba51d7b7c14c7749c55f /src
parent486e1b8351429e5e4af67dfa2a95a8bc8e5cdc91 (diff)
rename TIP_CLIENT_RECEIVING_* states to TIP_CLIENT_GET_*
Diffstat (limited to 'src')
-rw-r--r--src/main.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main.c b/src/main.c
index ed3b032..d4d1dea 100644
--- a/src/main.c
+++ b/src/main.c
@@ -40,8 +40,8 @@ static const char *addr;
struct ev_loop *tip_main_loop;
enum {
- TIP_CLIENT_RECEIVING_HEADER,
- TIP_CLIENT_RECEIVING_PAYLOAD,
+ TIP_CLIENT_GET_HEADER,
+ TIP_CLIENT_GET_PAYLOAD,
TIP_CLIENT_NOTIFY_REDIRECT,
TIP_CLIENT_DONE,
};
@@ -160,7 +160,7 @@ static int tip_client_state_recv_hdr(struct tip_client *cli)
cli->redirected = true;
tip_client_close(cli);
tip_client_connect(redirect_addr);
- cli->state = TIP_CLIENT_RECEIVING_HEADER;
+ cli->state = TIP_CLIENT_GET_HEADER;
return 0;
}
@@ -297,16 +297,16 @@ static void tip_client_read_cb(struct ev_loop *loop, struct ev_io *io, int event
cli->buf_len += ret;
switch (cli->state) {
- case TIP_CLIENT_RECEIVING_HEADER:
+ case TIP_CLIENT_GET_HEADER:
ret = tip_client_state_recv_hdr(cli);
if (ret < 0)
goto error;
if (!ret)
return;
- cli->state = TIP_CLIENT_RECEIVING_PAYLOAD;
+ cli->state = TIP_CLIENT_GET_PAYLOAD;
/* Fall through. */
- case TIP_CLIENT_RECEIVING_PAYLOAD:
+ case TIP_CLIENT_GET_PAYLOAD:
ret = tip_client_state_recv_payload(cli);
if (ret < 0)
goto error;
@@ -479,7 +479,7 @@ retry:
syslog(LOG_INFO, "Requesting file %s to server\n", filename);
tip_client_connect(argv[1]);
- _cli.state = TIP_CLIENT_RECEIVING_HEADER;
+ _cli.state = TIP_CLIENT_GET_HEADER;
while (_cli.state != TIP_CLIENT_DONE && !_cli.error)
ev_loop(tip_main_loop, 0);