Advertisement
Guest User

Untitled

a guest
Jan 10th, 2020
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.52 KB | None | 0 0
  1. diff -ru pgbouncer-1.9.0_ORIG/include/bouncer.h pgbouncer-1.9.0_patch/include/bouncer.h
  2. --- pgbouncer-1.9.0_ORIG/include/bouncer.h  2018-08-08 01:07:14.000000000 +0500
  3. +++ pgbouncer-1.9.0_patch/include/bouncer.h  2020-01-10 19:23:25.271755325 +0500
  4. @@ -181,6 +181,7 @@
  5.  bool pga_pton(PgAddr *a, const char *s, int port);
  6.  const char *pga_ntop(const PgAddr *a, char *dst, int dstlen);
  7.  const char *pga_str(const PgAddr *a, char *dst, int dstlen);
  8. +const char *cached_hostname(void);
  9.  const char *pga_details(const PgAddr *a, char *dst, int dstlen);
  10.  int pga_cmp_addr(const PgAddr *a, const PgAddr *b);
  11. diff -ru pgbouncer-1.9.0_ORIG/src/client.c pgbouncer-1.9.0_patch/src/client.c
  12. --- pgbouncer-1.9.0_ORIG/src/client.c  2018-07-31 00:52:16.000000000 +0500
  13. +++ pgbouncer-1.9.0_patch/src/client.c  2020-01-10 19:23:57.421246389 +0500
  14. @@ -413,7 +413,7 @@
  15.  
  16.      /* add details */
  17.      details = pga_details(&client->remote_addr, abuf, sizeof(abuf));
  18. -    snprintf(buf, sizeof(buf), "%s - %s", app_name, details);
  19. +    snprintf(buf, sizeof(buf), "%s - %s [%s]", app_name, details, cached_hostname());
  20.      app_name = buf;
  21.    }
  22.    if (app_name) {
  23. diff -ru pgbouncer-1.9.0_ORIG/src/util.c pgbouncer-1.9.0_patch/src/util.c
  24. --- pgbouncer-1.9.0_ORIG/src/util.c  2018-07-27 02:43:02.000000000 +0500
  25. +++ pgbouncer-1.9.0_patch/src/util.c  2020-01-10 19:23:04.822079311 +0500
  26. @@ -414,7 +414,7 @@
  27.    return dst;
  28.  }
  29.  
  30. -static const char *cached_hostname(void)
  31. +const char *cached_hostname(void)
  32.  {
  33.    static char cache[256];
  34.    int err;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement