rename HTTP GET handlers
parent
be1b23b5f9
commit
be1a7b9563
|
@ -122,7 +122,7 @@ static void tip_client_progress(struct tip_client *cli, bool now)
|
||||||
|
|
||||||
static int tip_client_connect(const char *addr);
|
static int tip_client_connect(const char *addr);
|
||||||
|
|
||||||
static int tip_client_state_recv_hdr(struct tip_client *cli)
|
static int tip_client_get_hdr(struct tip_client *cli)
|
||||||
{
|
{
|
||||||
char *ptr, *trailer, *payload;
|
char *ptr, *trailer, *payload;
|
||||||
char redirect_addr[32];
|
char redirect_addr[32];
|
||||||
|
@ -218,7 +218,7 @@ static int tip_client_state_recv_hdr(struct tip_client *cli)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int tip_client_state_recv_payload(struct tip_client *cli)
|
static int tip_client_get_payload(struct tip_client *cli)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
@ -298,7 +298,7 @@ static void tip_client_read_cb(struct ev_loop *loop, struct ev_io *io, int event
|
||||||
|
|
||||||
switch (cli->state) {
|
switch (cli->state) {
|
||||||
case TIP_CLIENT_GET_HEADER:
|
case TIP_CLIENT_GET_HEADER:
|
||||||
ret = tip_client_state_recv_hdr(cli);
|
ret = tip_client_get_hdr(cli);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto error;
|
goto error;
|
||||||
if (!ret)
|
if (!ret)
|
||||||
|
@ -307,7 +307,7 @@ static void tip_client_read_cb(struct ev_loop *loop, struct ev_io *io, int event
|
||||||
cli->state = TIP_CLIENT_GET_PAYLOAD;
|
cli->state = TIP_CLIENT_GET_PAYLOAD;
|
||||||
/* Fall through. */
|
/* Fall through. */
|
||||||
case TIP_CLIENT_GET_PAYLOAD:
|
case TIP_CLIENT_GET_PAYLOAD:
|
||||||
ret = tip_client_state_recv_payload(cli);
|
ret = tip_client_get_payload(cli);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto error;
|
goto error;
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
|
|
Loading…
Reference in New Issue