uclient_backend_set_error(&uh->uc, code);
}
+static void uclient_http_request_disconnect(struct uclient *cl)
+{
+ struct uclient_http *uh = container_of(cl, struct uclient_http, uc);
+
+ if (!uh->us)
+ return;
+
+ uh->eof = true;
+ uh->disconnect = true;
+ uloop_timeout_set(&uh->disconnect_t, 1);
+}
+
static void uclient_notify_eof(struct uclient_http *uh)
{
struct ustream *us = uh->us;
uclient_backend_set_eof(&uh->uc);
if (uh->connection_close)
- uclient_http_disconnect(uh);
+ uclient_http_request_disconnect(&uh->uc);
}
static void uclient_http_reset_state(struct uclient_http *uh)
return 0;
}
-static void uclient_http_request_disconnect(struct uclient *cl)
-{
- struct uclient_http *uh = container_of(cl, struct uclient_http, uc);
-
- if (!uh->us)
- return;
-
- uh->eof = true;
- uh->disconnect = true;
- uloop_timeout_set(&uh->disconnect_t, 1);
-}
-
const struct uclient_backend uclient_backend_http = {
.prefix = uclient_http_prefix,