system/core
Revision | 8ef22b102ce2eaa5668adc2631ad24017777d610 (tree) |
---|---|
Zeit | 2019-05-23 06:06:56 |
Autor | Josh Gao <jmgao@goog...> |
Commiter | Android (Google) Code Review |
Merge "adbd: respond to device-to-host control transfers." into qt-dev
@@ -380,7 +380,12 @@ struct UsbFfsConnection : public Connection { | ||
380 | 380 | << ", wLength = " << static_cast<int>(event.u.setup.wLength); |
381 | 381 | |
382 | 382 | if ((event.u.setup.bRequestType & USB_DIR_IN)) { |
383 | - LOG(WARNING) << "received a device-to-host control transfer, ignoring"; | |
383 | + LOG(INFO) << "acking device-to-host control transfer"; | |
384 | + ssize_t rc = adb_write(control_fd_.get(), "", 0); | |
385 | + if (rc != 0) { | |
386 | + PLOG(ERROR) << "failed to write empty packet to host"; | |
387 | + break; | |
388 | + } | |
384 | 389 | } else { |
385 | 390 | std::string buf; |
386 | 391 | buf.resize(event.u.setup.wLength + 1); |