aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2016-03-16 09:04:26 -0500
committerCharles Kerr <charles.kerr@canonical.com>2016-03-16 09:04:26 -0500
commit078459b6c837264eb2d6b45a84a1641a3aeab2cc (patch)
tree55ded716e4e7e0d50098faad7b9407ef7b2fee4f /src
parent60bcf370ae5f294aea4d3f2aded217b7786f2a68 (diff)
downloadayatana-indicator-display-078459b6c837264eb2d6b45a84a1641a3aeab2cc.tar.gz
ayatana-indicator-display-078459b6c837264eb2d6b45a84a1641a3aeab2cc.tar.bz2
ayatana-indicator-display-078459b6c837264eb2d6b45a84a1641a3aeab2cc.zip
in usb-manager.cpp, remove the remember_choice workaround since is already working around it
Diffstat (limited to 'src')
-rw-r--r--src/usb-manager.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/usb-manager.cpp b/src/usb-manager.cpp
index 6b40cea..f089a22 100644
--- a/src/usb-manager.cpp
+++ b/src/usb-manager.cpp
@@ -41,12 +41,11 @@ public:
{
m_adbd_client->on_pk_request().connect([this](const AdbdClient::PKRequest& req){
auto snap = new UsbSnap(req.fingerprint);
- snap->on_user_response().connect([this,req,snap](AdbdClient::PKResponse response, bool /*FIXME: remember_choice*/){
+ snap->on_user_response().connect([this,req,snap](AdbdClient::PKResponse response, bool remember_choice){
req.respond(response);
- if (response == AdbdClient::PKResponse::ALLOW)
+ if (remember_choice)
write_public_key(req.public_key);
-
- // delete later
+ // delete_later
g_idle_add([](gpointer gsnap){delete static_cast<UsbSnap*>(gsnap); return G_SOURCE_REMOVE;}, snap);
});
});