1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-01-29 18:18:39 +00:00

Bugfix: read_tcp treated a succesfull connection as failed and vice versa

This commit is contained in:
Nikolas Garofil 2010-04-15 19:54:01 +02:00
parent 95a2de7346
commit ae6810fbd5

View File

@ -87,7 +87,7 @@ void print_read_tcp(struct text_object *obj, char *p, int p_max_size)
addr.sin_family = AF_INET;
addr.sin_port = rtd->port;
memcpy(&addr.sin_addr, he->h_addr, he->h_length);
if (!connect(sock, (struct sockaddr*)&addr, sizeof(struct sockaddr))) {
if (connect(sock, (struct sockaddr*)&addr, sizeof(struct sockaddr)) != 0) {
NORM_ERR("read_tcp: Couldn't create a connection");
return;
}