Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Barenboim committed Feb 22, 2024
1 parent 37a3aec commit afc0ac6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/kernel_win/Communicator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ int Communicator::bind(CommService *service)
service->ref = 1;
for (i = 0; i < this->handler_threads; i++)
{
auto *new_ctx = new AcceptConext(service);
auto *new_ctx = new AcceptContext(service);

data.operation = PD_OP_ACCEPT;
data.handle = (HANDLE)listen_sockfd;
Expand Down Expand Up @@ -1613,7 +1613,7 @@ void Communicator::handle_connect_result(struct poller_result *res)

void Communicator::handle_accept_result(struct poller_result *res)
{
AcceptConext *ctx = (AcceptConext *)res->data.context;
AcceptContext *ctx = (AcceptContext *)res->data.context;
CommService *service = (CommService *)ctx->service;
SOCKET sockfd = ctx->accept_sockfd;
CommConnEntry *entry;
Expand Down
4 changes: 2 additions & 2 deletions src/kernel_win/WinPoller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ int WinPoller::cancel_pending_io(HANDLE handle) const

static int __accept_io(IOCPData *iocp_data, int timeout)
{
AcceptConext *ctx = (AcceptConext *)iocp_data->data.context;
AcceptContext *ctx = (AcceptContext *)iocp_data->data.context;
DWORD dwBytes;
BOOL ret = AcceptEx((SOCKET)iocp_data->data.handle, ctx->accept_sockfd,
ctx->buf, 0, ACCEPT_ADDR_SIZE, ACCEPT_ADDR_SIZE,
Expand Down Expand Up @@ -415,7 +415,7 @@ int WinPoller::put_io(const struct poller_data *data, int timeout)
static void __accept_on_success(struct poller_result *res)
{
SOCKET listen_sockfd = (SOCKET)res->data.handle;
AcceptConext *ctx = (AcceptConext *)res->data.context;
AcceptContext *ctx = (AcceptContext *)res->data.context;
struct sockaddr *local;
struct sockaddr *remote;
int local_len = sizeof (struct sockaddr);
Expand Down
6 changes: 3 additions & 3 deletions src/kernel_win/WinPoller.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ struct poller_result
struct poller_data data;
};

class AcceptConext
class AcceptContext
{
public:
void *service;
Expand All @@ -61,14 +61,14 @@ class AcceptConext
struct sockaddr *remote;
int remote_len;

AcceptConext(void *sc)
AcceptContext(void *sc)
{
service = sc;

buf = new char[ACCEPT_ADDR_SIZE * 2];
}

~AcceptConext()
~AcceptContext()
{
delete []buf;
}
Expand Down

0 comments on commit afc0ac6

Please sign in to comment.