Changeset 4944:ab7a21ce8778 in nginx


Ignore:
Timestamp:
11/30/12 11:26:50 (3 years ago)
Author:
Ruslan Ermilov <ru@…>
Branch:
default
Convert:
svn:c3fe7df1-7212-e011-8a91-001109144009/trunk@4945
Message:

Fixed the NGX_SOCKADDR_STRLEN macro definition.

The ngx_sock_ntop() function, when told to print both address and port,
prints IPv6 address in square brackets, followed by colon and port.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/core/ngx_inet.h

    r4412 r4944  
    3131#define NGX_SOCKADDR_STRLEN   (sizeof("unix:") - 1 + NGX_UNIX_ADDRSTRLEN)
    3232#else
    33 #define NGX_SOCKADDR_STRLEN   (NGX_INET6_ADDRSTRLEN + sizeof(":65535") - 1)
     33#define NGX_SOCKADDR_STRLEN   (NGX_INET6_ADDRSTRLEN + sizeof("[]:65535") - 1)
    3434#endif
    3535
Note: See TracChangeset for help on using the changeset viewer.