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

Unified Diff: tools/android/forwarder2/device_listener.cc

Issue 15008004: Add device port unmapping support to forwarder2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address David's comments Created 7 years, 7 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 | « tools/android/forwarder2/device_forwarder_main.cc ('k') | tools/android/forwarder2/forwarder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android/forwarder2/device_listener.cc
diff --git a/tools/android/forwarder2/device_listener.cc b/tools/android/forwarder2/device_listener.cc
index d67151dae131e22fbc21daa89ff1938dcadfed28..4b6265dc8e60658bb4e891b91a1ed65b02c3f672 100644
--- a/tools/android/forwarder2/device_listener.cc
+++ b/tools/android/forwarder2/device_listener.cc
@@ -30,8 +30,8 @@ DeviceListener::DeviceListener(scoped_ptr<Socket> adb_control_socket, int port)
is_alive_(false),
must_exit_(false) {
CHECK(adb_control_socket_.get());
- adb_control_socket_->set_exit_notifier_fd(exit_notifier_.receiver_fd());
- listener_socket_.set_exit_notifier_fd(exit_notifier_.receiver_fd());
+ adb_control_socket_->AddEventFd(exit_notifier_.receiver_fd());
+ listener_socket_.AddEventFd(exit_notifier_.receiver_fd());
pthread_mutex_init(&adb_data_socket_mutex_, NULL);
pthread_cond_init(&adb_data_socket_cond_, NULL);
}
@@ -106,7 +106,7 @@ void DeviceListener::RunInternal() {
while (!must_exit_) {
scoped_ptr<Socket> device_data_socket(new Socket);
if (!listener_socket_.Accept(device_data_socket.get())) {
- if (listener_socket_.exited()) {
+ if (listener_socket_.DidReceiveEvent()) {
LOG(INFO) << "Received exit notification, stopped accepting clients.";
break;
}
« no previous file with comments | « tools/android/forwarder2/device_forwarder_main.cc ('k') | tools/android/forwarder2/forwarder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698