Commits
Andris Mednis authored 1e6450e3e8a
...G...PS. [ZBXNEXT-1263] added 'peer' element to 'zbx_socket_t' structure (issue 85)
When using TLS a connection can be closed at any time. To include peer's hostname or IP address in error and debug
messages it must be collected while connection is established.
This change:
- modifies 'zbx_socket_t' structure by adding 129 character buffer 'peer',
- after successful TCP connect or accept fills-in the 'peer' buffer. This allows informative error reporting
even after connection is closed,
- replaces almost all calls of 'get_ip_by_socket(sock)' with 'sock->peer'.