]> granicus.if.org Git - pgbouncer/commitdiff
Fix sloppy english in the comments.
authorMarko Kreen <markokr@gmail.com>
Mon, 23 Jul 2007 08:53:52 +0000 (08:53 +0000)
committerMarko Kreen <markokr@gmail.com>
Mon, 23 Jul 2007 08:53:52 +0000 (08:53 +0000)
Patch by Robert Gogolok.

src/admin.c
src/client.c
src/janitor.c
src/loader.c
src/main.c
src/objects.c
src/pooler.c
src/sbuf.c
src/takeover.c
src/util.c

index f116192719aac2cd99d5b61d155076f746c812fb..2e39bebe66139efcd86303a33944ce7bd7348b0b 100644 (file)
@@ -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);
index 8b35e85810c45c090063948d63000be6b691d97e..3b15b4718db74516bd89b85a96422fc607e8d6a2 100644 (file)
@@ -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;
                }
 
index a2b52863cd8436510f8b9497d8ab8f73182f47b6..a539942de318eff010f41d259eca42433f781694 100644 (file)
@@ -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;
index bc08d597198078b52ef9d75798b412b4d55a0e21..d394597de83b31237808b511f4268e7b8492a599 100644 (file)
@@ -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;
 
index 952ac99bd9b9171b3f8af7420824c2096ba072b4..7221cc25efb5fd0a1eae64e503587a8d2cc7c097 100644 (file)
@@ -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;
 }
index 7385109d7f8820419e0a84cd18a4491830372182..b8304d1a0c8678fa00b5040ffe6461afbea3a797 100644 (file)
@@ -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);
 
index 753d4b066a135a8e67fa7568c3ae2fc0175f7a87..37a0c65271bd2ec353adf7fac8b64d1a24178853 100644 (file)
@@ -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));
index f4fcfddfdc5fbefaa870d94689d7176817a426b2..6479244ac9381854ec1a1fd3b1c635984fd84e7f 100644 (file)
@@ -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;
index c8ca0d37614af2145f85f4a3572e6cf0ca04db5a..745e7f8a09c48b5475a24faf9d48f23d38c7d48c 100644 (file)
@@ -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
  */
index 7ce698dcb978ebdb571e9a2960244aa09efc1c4c..0f3b750d629b652fc198b34b91fb978371e9dc88 100644 (file)
@@ -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));