adbd_auth function signature changes.
Bug: 111434128
Test: make
Change-Id: If801346e436dc7d7a7dfbbc296f7b2393d1e91af
Exempt-From-Owner-Approval: approved already
diff --git a/adb/daemon/auth.cpp b/adb/daemon/auth.cpp
index ec4ab4a..1f6664e 100644
--- a/adb/daemon/auth.cpp
+++ b/adb/daemon/auth.cpp
@@ -85,8 +85,8 @@
static void IteratePublicKeys(std::function<bool(std::string_view public_key)> f) {
adbd_auth_get_public_keys(
auth_ctx,
- [](const char* public_key, size_t len, void* arg) {
- return (*static_cast<decltype(f)*>(arg))(std::string_view(public_key, len));
+ [](void* opaque, const char* public_key, size_t len) {
+ return (*static_cast<decltype(f)*>(opaque))(std::string_view(public_key, len));
},
&f);
}
@@ -160,9 +160,9 @@
}
void adbd_auth_init(void) {
- AdbdAuthCallbacks cb;
+ AdbdAuthCallbacksV1 cb;
cb.version = 1;
- cb.callbacks.v1.key_authorized = adbd_auth_key_authorized;
+ cb.key_authorized = adbd_auth_key_authorized;
auth_ctx = adbd_auth_new(&cb);
std::thread([]() {
adb_thread_setname("adbd auth");