mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-27 11:13:47 +00:00
Fix typo (found by codespell) (#753)
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
This commit is contained in:
+1
-1
@@ -1426,7 +1426,7 @@ void enc_key_init(int method, const char *pass)
|
||||
return;
|
||||
}
|
||||
|
||||
// Inilitialize cache
|
||||
// Initialize cache
|
||||
cache_create(&iv_cache, 256, NULL);
|
||||
|
||||
#if defined(USE_CRYPTO_OPENSSL)
|
||||
|
||||
+1
-1
@@ -788,7 +788,7 @@ int main(int argc, char **argv)
|
||||
manager.nameservers = nameservers;
|
||||
manager.nameserver_num = nameserver_num;
|
||||
|
||||
// inilitialize ev loop
|
||||
// initialize ev loop
|
||||
struct ev_loop *loop = EV_DEFAULT;
|
||||
|
||||
// setuid
|
||||
|
||||
+5
-5
@@ -402,7 +402,7 @@ static remote_t *connect_to_remote(struct addrinfo *res,
|
||||
const char *iface = server->listen_ctx->iface;
|
||||
#endif
|
||||
|
||||
// initilize remote socks
|
||||
// initialize remote socks
|
||||
sockfd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
|
||||
if (sockfd < 0) {
|
||||
ERROR("socket");
|
||||
@@ -545,9 +545,9 @@ static void server_recv_cb(EV_P_ ev_io *w, int revents)
|
||||
// wait for more
|
||||
if (verbose) {
|
||||
#ifdef __MINGW32__
|
||||
LOGI("imcomplete header: %u", r);
|
||||
LOGI("incomplete header: %u", r);
|
||||
#else
|
||||
LOGI("imcomplete header: %zu", r);
|
||||
LOGI("incomplete header: %zu", r);
|
||||
#endif
|
||||
}
|
||||
return;
|
||||
@@ -1588,7 +1588,7 @@ int main(int argc, char **argv)
|
||||
LOGI("initializing ciphers... %s", method);
|
||||
int m = enc_init(password, method);
|
||||
|
||||
// inilitialize ev loop
|
||||
// initialize ev loop
|
||||
struct ev_loop *loop = EV_DEFAULT;
|
||||
|
||||
// setup udns
|
||||
@@ -1606,7 +1606,7 @@ int main(int argc, char **argv)
|
||||
for (int i = 0; i < nameserver_num; i++)
|
||||
LOGI("using nameserver: %s", nameservers[i]);
|
||||
|
||||
// inilitialize listen context
|
||||
// initialize listen context
|
||||
listen_ctx_t listen_ctx_list[server_num];
|
||||
|
||||
// bind to each interface
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@ extern "C" {
|
||||
* Calling this function will block the current thread forever if the server
|
||||
* starts successfully.
|
||||
*
|
||||
* Make sure start the server in a seperate process to avoid any potential
|
||||
* Make sure start the server in a separate process to avoid any potential
|
||||
* memory and socket leak.
|
||||
*
|
||||
* If failed, -1 is returned. Errors will output to the log file.
|
||||
|
||||
+4
-4
@@ -780,7 +780,7 @@ static void remote_recv_cb(EV_P_ ev_io *w, int revents)
|
||||
}
|
||||
#endif
|
||||
|
||||
// handle the UDP packet sucessfully,
|
||||
// handle the UDP packet successfully,
|
||||
// triger the timer
|
||||
ev_timer_again(EV_A_ & remote_ctx->watcher);
|
||||
|
||||
@@ -1265,16 +1265,16 @@ int init_udprelay(const char *server_host, const char *server_port,
|
||||
#endif
|
||||
int mtu, int method, int auth, int timeout, const char *iface)
|
||||
{
|
||||
// Inilitialize ev loop
|
||||
// Initialize ev loop
|
||||
struct ev_loop *loop = EV_DEFAULT;
|
||||
|
||||
// Inilitialize MTU
|
||||
// Initialize MTU
|
||||
if (mtu > 0) {
|
||||
packet_size = mtu - 1 - 28 - 2 - 64;
|
||||
buf_size = packet_size * 2;
|
||||
}
|
||||
|
||||
// Inilitialize cache
|
||||
// Initialize cache
|
||||
struct cache *conn_cache;
|
||||
cache_create(&conn_cache, MAX_UDP_CONN_NUM, free_cb);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user