In the source code, file src/libs/zbxcomms/telnet.c:
int telnet_login(ZBX_SOCKET socket_fd, const char *username, const char *password, AGENT_RESULT *result) { const char *__function_name = "telnet_login"; [...] while (ZBX_TCP_ERROR != (rc == telnet_read(socket_fd, buf, &sz, &offset))) { if (':' == telnet_lastchar(buf, offset)) break; }
Instead of comparison operator
ZBX_TCP_ERROR != (rc == telnet_read
there should be an assignment operator
ZBX_TCP_ERROR != (rc = telnet_read.
This may cause endless loop if telnet server would not request password.