Github user interma commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/1072#discussion_r94204415
  
    --- Diff: src/backend/libpq/rangerrest.c ---
    @@ -49,10 +49,26 @@ char* AclObjectKindStr[] =
        "none"               /* MUST BE LAST */
     };
     
    +static int request_id = 1;
    +
    +void getClientIP(char *remote_host)
    +{
    +   Port *port = MyProcPort;
    +   char remote_port[32];
    +   remote_port[0] = '\0';
    +
    +   int ret = pg_getnameinfo_all(&port->raddr.addr, port->raddr.salen,
    +                                   remote_host, sizeof(remote_host),
    --- End diff --
    
    There may be wrong:
    sizeof(remote_host) always == sizeof(void *) == 8byte
    
    Should define a constant for buffer size.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to