diff options
-rw-r--r-- | src/main.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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); |