mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-02-11 16:38:55 +00:00
Bugfix: read_tcp treated a succesfull connection as failed and vice versa
This commit is contained in:
parent
95a2de7346
commit
ae6810fbd5
@ -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_family = AF_INET;
|
||||||
addr.sin_port = rtd->port;
|
addr.sin_port = rtd->port;
|
||||||
memcpy(&addr.sin_addr, he->h_addr, he->h_length);
|
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");
|
NORM_ERR("read_tcp: Couldn't create a connection");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user