summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2004-03-02 18:26:42 +0000
committerDan Winship <danw@src.gnome.org>2004-03-02 18:26:42 +0000
commit1d828341e2825335b7b5189ee847d84df376b111 (patch)
treef5b4feb63103be890ade1991453c2a0242395a1f
parentf4c39c73fb69a567b13b58573ac827d11d010577 (diff)
downloadlibsoup-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--ChangeLog6
-rw-r--r--libsoup/soup-dns.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 9059082f..e4377720 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;