From: Marko Kreen Date: Mon, 23 Jul 2007 08:53:52 +0000 (+0000) Subject: Fix sloppy english in the comments. X-Git-Tag: pgbouncer_1_1~77 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=612fcbba3386c57e4069e94a1bd9388d3cb31ba6;p=pgbouncer Fix sloppy english in the comments. Patch by Robert Gogolok. --- diff --git a/src/admin.c b/src/admin.c index f116192..2e39beb 100644 --- a/src/admin.c +++ b/src/admin.c @@ -270,7 +270,7 @@ static bool admin_show_fds(PgSocket *admin, const char *arg) return admin_error(admin, "admin access needed"); /* - * Its very hard to send it reliably over in async manner, + * It's very hard to send it reliably over in async manner, * so turn async off for this resultset. */ socket_set_nonblocking(sbuf_socket(&admin->sbuf), 0); diff --git a/src/client.c b/src/client.c index 8b35e85..3b15b47 100644 --- a/src/client.c +++ b/src/client.c @@ -171,7 +171,7 @@ static bool handle_client_startup(PgSocket *client, MBuf *pkt) SBuf *sbuf = &client->sbuf; - /* dont tolerate partial packets */ + /* don't tolerate partial packets */ if (!get_header(pkt, &pkt_type, &pkt_len)) { disconnect_client(client, true, "client sent bad pkt header"); return false; @@ -234,9 +234,9 @@ static bool handle_client_startup(PgSocket *client, MBuf *pkt) return false; } - /* havent requested it */ + /* haven't requested it */ if (cf_auth_type <= AUTH_TRUST) { - disconnect_client(client, true, "unreqested passwd pkt"); + disconnect_client(client, true, "unrequested passwd pkt"); return false; } diff --git a/src/janitor.c b/src/janitor.c index a2b5286..a539942 100644 --- a/src/janitor.c +++ b/src/janitor.c @@ -139,7 +139,7 @@ static void launch_recheck(PgPool *pool) if (!res) disconnect_server(server, false, "test query failed"); } else - /* make immidiately available */ + /* make immediately available */ release_server(server); } @@ -238,7 +238,7 @@ void per_loop_maint(void) int active = 0; int partial_pause = 0; - /* dont touch anything if takeover is in progress */ + /* don't touch anything if takeover is in progress */ if (cf_reboot) return; @@ -277,7 +277,7 @@ void per_loop_maint(void) } } -/* maintaing clients in pool */ +/* maintaining clients in pool */ static void pool_client_maint(PgPool *pool) { List *item, *tmp; @@ -436,13 +436,13 @@ static void cleanup_client_logins(void) } } -/* full-scale maintenenace, done only occasionally */ +/* full-scale maintenance, done only occasionally */ static void do_full_maint(int sock, short flags, void *arg) { List *item; PgPool *pool; - /* dont touch anything if takeover is in progress */ + /* don't touch anything if takeover is in progress */ if (cf_reboot) goto skip; @@ -476,7 +476,7 @@ void janitor_setup(void) } /* as [pgbouncer] section can be loaded after databases, - theres need for review */ + there's need for review */ void config_postprocess(void) { List *item; diff --git a/src/loader.c b/src/loader.c index bc08d59..d394597 100644 --- a/src/loader.c +++ b/src/loader.c @@ -488,7 +488,7 @@ bool cf_set_str(ConfElem *elem, const char *val, PgSocket *console) char **str_p = elem->dst; char *tmp; - /* dont touch if not changed */ + /* don't touch if not changed */ if (*str_p && strcmp(*str_p, val) == 0) return true; diff --git a/src/main.c b/src/main.c index 952ac99..7221cc2 100644 --- a/src/main.c +++ b/src/main.c @@ -245,7 +245,7 @@ static void handle_sigint(int sock, short flags, void *arg) { log_info("Got SIGINT, shutting down"); if (cf_reboot) - fatal("Takeover was in progress, going down immidiately"); + fatal("Takeover was in progress, going down immediately"); cf_pause_mode = P_PAUSE; cf_shutdown = 1; } diff --git a/src/objects.c b/src/objects.c index 7385109..b8304d1 100644 --- a/src/objects.c +++ b/src/objects.c @@ -93,7 +93,7 @@ static void clean_socket(PgSocket *sk) sk->auth_user = NULL; } -/* allocate & fll client socket */ +/* allocate & fill client socket */ static PgSocket *new_client(void) { PgSocket *client; @@ -255,7 +255,7 @@ void change_server_state(PgSocket *server, SocketState newstate) break; case SV_IDLE: if (server->close_needed) - /* try to avoid immidiate usage then */ + /* try to avoid immediate usage then */ statlist_append(&server->head, &pool->idle_server_list); else /* otherwise use LIFO */ @@ -372,7 +372,7 @@ PgUser *force_user(PgDatabase *db, const char *name, const char *passwd) return user; } -/* find a existing database */ +/* find an existing database */ PgDatabase *find_database(const char *name) { List *item; @@ -578,7 +578,7 @@ bool release_server(PgSocket *server) change_server_state(server, newstate); - /* immidiately process waiters, to give fair chance */ + /* immediately process waiters, to give fair chance */ if (newstate == SV_IDLE) { PgSocket *client = first_socket(&pool->waiting_client_list); if (client) { @@ -679,7 +679,7 @@ void disconnect_client(PgSocket *client, bool notify, const char *reason) /* send reason to client */ if (notify && reason) { /* - * dont send Ready pkt here, or client wont notice + * don't send Ready pkt here, or client won't notice * closed connection */ send_pooler_error(client, false, reason); @@ -703,7 +703,7 @@ void launch_new_connection(PgPool *pool) return; } - /* if server bounces, dont retry too fast */ + /* if server bounces, don't retry too fast */ if (pool->last_connect_failed) { usec_t now = get_cached_time(); if (now - pool->last_connect_time < cf_server_login_retry) { @@ -803,7 +803,7 @@ bool finish_client_login(PgSocket *client) slog_debug(client, "logged in"); - /* in suspend, dont let send query */ + /* in suspend, don't let send query */ if (cf_pause_mode == P_SUSPEND) suspend_socket(client); diff --git a/src/pooler.c b/src/pooler.c index 753d4b0..37a0c65 100644 --- a/src/pooler.c +++ b/src/pooler.c @@ -184,7 +184,7 @@ pool_accept(int sock, short flags, void *is_unix) fd = accept(sock, &addr.sa, &len); if (fd < 0) { /* - * probably fd limit, pointess to try often + * probably fd limit, pointless to try often * wait a bit, hope that admin resolves somehow */ log_error("accept() failed: %s", strerror(errno)); diff --git a/src/sbuf.c b/src/sbuf.c index f4fcfdd..6479244 100644 --- a/src/sbuf.c +++ b/src/sbuf.c @@ -32,7 +32,7 @@ /* * if less that this amount of data is pending, then - * prefer to merge if with next recv() + * prefer to merge it with next recv() */ #define SMALL_PKT 16 @@ -163,7 +163,7 @@ void sbuf_connect(SBuf *sbuf, const PgAddr *addr, const char *unix_dir, int time } } -/* dont wait for data on this socket */ +/* don't wait for data on this socket */ void sbuf_pause(SBuf *sbuf) { AssertActive(sbuf); @@ -182,7 +182,7 @@ void sbuf_continue(SBuf *sbuf) /* * There may be some data already received, * but not certain, so avoid SKIP_RECV. - * Anyway, it affect only client sockets. + * Anyway, it affects only client sockets. */ sbuf_main_loop(sbuf, DO_RECV); } @@ -230,7 +230,7 @@ void sbuf_prepare_send(SBuf *sbuf, SBuf *dst, int amount) sbuf->dst = dst; } -/* proto_fn tells to skip sone amount of bytes */ +/* proto_fn tells to skip some amount of bytes */ void sbuf_prepare_skip(SBuf *sbuf, int amount) { AssertActive(sbuf); @@ -254,7 +254,7 @@ void sbuf_prepare_skip(SBuf *sbuf, int amount) * and processing can continue. * * If it returned false it used sbuf_pause(), sbuf_close() or simply - * wants to wait for next event loop (eg. too few data available). + * wants to wait for next event loop (e.g. too few data available). * Callee should not touch sbuf in that case and just return to libevent. */ static bool sbuf_call_proto(SBuf *sbuf, int event) @@ -277,7 +277,7 @@ static bool sbuf_call_proto(SBuf *sbuf, int event) return res; } -/* lets wait for new data */ +/* let's wait for new data */ static void sbuf_wait_for_data(SBuf *sbuf) { event_set(&sbuf->ev, sbuf->sock, EV_READ | EV_PERSIST, sbuf_recv_cb, sbuf); @@ -304,7 +304,7 @@ static void sbuf_send_cb(int sock, short flags, void *arg) sbuf_main_loop(sbuf, SKIP_RECV); } -/* socket is full, wait until its writable again */ +/* socket is full, wait until it's writable again */ static void sbuf_queue_send(SBuf *sbuf) { AssertActive(sbuf); @@ -316,7 +316,7 @@ static void sbuf_queue_send(SBuf *sbuf) } /* - * Theres data in buffer to be sent. returns bool if processing can continue. + * There's data in buffer to be sent. Returns bool if processing can continue. * * Does not look at pkt_pos/remain fields, expects them to be merged to send_* */ @@ -358,9 +358,9 @@ try_more: AssertActive(sbuf); /* - * Should do sbuf_queue_send() immidiately? + * Should do sbuf_queue_send() immediately? * - * To be sure, lets run into EAGAIN. + * To be sure, let's run into EAGAIN. */ if (res < avail) goto try_more; diff --git a/src/takeover.c b/src/takeover.c index c8ca0d3..745e7f8 100644 --- a/src/takeover.c +++ b/src/takeover.c @@ -20,7 +20,7 @@ * Connect to running bouncer process, load fds from it, shut it down * and continue with them. * - * Each row from SHOW FDS will have corresponging fd in ancillary message. + * Each row from SHOW FDS will have corresponding fd in ancillary message. * * Manpages: unix, sendmsg, recvmsg, cmsg, readv */ diff --git a/src/util.c b/src/util.c index 7ce698d..0f3b750 100644 --- a/src/util.c +++ b/src/util.c @@ -347,7 +347,7 @@ static usec_t get_time_usec(void) } /* - * cache time, as we dont need sub-second precision + * cache time, as we don't need sub-second precision */ static usec_t time_cache = 0; @@ -395,7 +395,7 @@ void tune_socket(int sock, bool is_unix) if (res < 0) fatal_perror("fcntl FD_CLOEXEC"); - /* when no data avail, return EAGAIN instead blocking */ + /* when no data available, return EAGAIN instead blocking */ socket_set_nonblocking(sock, 1); #ifdef SO_NOSIGPIPE @@ -427,7 +427,7 @@ void tune_socket(int sock, bool is_unix) if (res < 0) fatal_perror("setsockopt TCP_KEEPCNT"); } - /* how lond the connection can stay idle before sending keepalive pkts */ + /* how long the connection can stay idle before sending keepalive pkts */ if (cf_tcp_keepidle) { val = cf_tcp_keepidle; res = setsockopt(sock, IPPROTO_TCP, TCP_KEEPIDLE, &val, sizeof(val));