Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(660)

Unified Diff: libcurl_http_fetcher.h

Issue 4190009: AU: Watch for writes on write fds only, and for reads on read fds. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: fix comment Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | libcurl_http_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: libcurl_http_fetcher.h
diff --git a/libcurl_http_fetcher.h b/libcurl_http_fetcher.h
index 25c4e4975a9595aaa40abd719b349edeee7cda65..3a50bda46e7ae2ce365f3661f926bc2cb4f2200f 100644
--- a/libcurl_http_fetcher.h
+++ b/libcurl_http_fetcher.h
@@ -147,10 +147,12 @@ class LibcurlHttpFetcher : public HttpFetcher {
CURLM *curl_multi_handle_;
CURL *curl_handle_;
- // a list of all file descriptors that we're waiting on from the
- // glib main loop
+ // Lists of all read(0)/write(1) file descriptors that we're waiting on from
+ // the glib main loop. libcurl may open/close descriptors and switch their
+ // directions so maintain two separate lists so that watch conditions can be
+ // set appropriately.
typedef std::map<int, std::pair<GIOChannel*, guint> > IOChannels;
- IOChannels io_channels_;
+ IOChannels io_channels_[2];
// if non-NULL, a timer we're waiting on. glib main loop will call us back
// when it fires.
« no previous file with comments | « no previous file | libcurl_http_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698