diff options
author | Dan Winship <danw@src.gnome.org> | 2004-03-02 18:26:42 +0000 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2004-03-02 18:26:42 +0000 |
commit | 1d828341e2825335b7b5189ee847d84df376b111 (patch) | |
tree | f5b4feb63103be890ade1991453c2a0242395a1f | |
parent | f4c39c73fb69a567b13b58573ac827d11d010577 (diff) | |
download | libsoup-1d828341e2825335b7b5189ee847d84df376b111.tar.gz |
Only loop on EINTR if bytes_read is -1, since the value of errno is
* libsoup/soup-dns.c (check_hostent): Only loop on EINTR if
bytes_read is -1, since the value of errno is irrelevant when
bytes_read is 0. Probably #54960.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | libsoup/soup-dns.c | 4 |
2 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,9 @@ +2004-03-02 Dan Winship <danw@ximian.com> + + * libsoup/soup-dns.c (check_hostent): Only loop on EINTR if + bytes_read is -1, since the value of errno is irrelevant when + bytes_read is 0. Probably #54960. + 2004-03-01 Rodrigo Moya <rodrigo@ximian.com> * libsoup/soup-soap-response.h: removed not-implemented function's diff --git a/libsoup/soup-dns.c b/libsoup/soup-dns.c index f8b1cc42..8cbc3708 100644 --- a/libsoup/soup-dns.c +++ b/libsoup/soup-dns.c @@ -610,7 +610,7 @@ check_hostent (SoupDNSEntry *entry, gboolean block) soup_dns_lock (); - if (entry->resolved || !entry->fd) { + if (entry->resolved) { soup_dns_unlock (); return; } @@ -638,7 +638,7 @@ check_hostent (SoupDNSEntry *entry, gboolean block) if (bytes_read > 0) nread += bytes_read; - } while (bytes_read > 0 || errno == EINTR); + } while (bytes_read > 0 || (bytes_read == -1 && errno == EINTR)); close (entry->fd); entry->fd = -1; |