aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2016-03-18 10:42:41 -0500
committerCharles Kerr <charles.kerr@canonical.com>2016-03-18 10:42:41 -0500
commitccecdd46da33ff51b2d45528439de09fe87a393c (patch)
tree6f2236038b1c2fef507f0e1d080dbbfd63c01cf8 /src
parentf55775498feffedcd0ef717a50913f41429a2d1a (diff)
downloadayatana-indicator-display-ccecdd46da33ff51b2d45528439de09fe87a393c.tar.gz
ayatana-indicator-display-ccecdd46da33ff51b2d45528439de09fe87a393c.tar.bz2
ayatana-indicator-display-ccecdd46da33ff51b2d45528439de09fe87a393c.zip
add some extra debug statements to usb-manager.cpp to track user response and the act of writing the pk out to disk
Diffstat (limited to 'src')
-rw-r--r--src/usb-manager.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/usb-manager.cpp b/src/usb-manager.cpp
index f089a22..335db00 100644
--- a/src/usb-manager.cpp
+++ b/src/usb-manager.cpp
@@ -42,8 +42,9 @@ 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 remember_choice){
+ g_debug("user responded! response %d, remember %d", int(response), int(remember_choice));
req.respond(response);
- if (remember_choice)
+ if (remember_choice && (response == AdbdClient::PKResponse::ALLOW))
write_public_key(req.public_key);
// delete_later
g_idle_add([](gpointer gsnap){delete static_cast<UsbSnap*>(gsnap); return G_SOURCE_REMOVE;}, snap);
@@ -59,6 +60,8 @@ private:
void write_public_key(const std::string& public_key)
{
+ g_debug("writing public key '%s' to '%s'", public_key.c_str(), m_public_keys_filename.c_str());
+
// confirm the directory exists
auto dirname = g_path_get_dirname(m_public_keys_filename.c_str());
const auto dir_exists = g_file_test(dirname, G_FILE_TEST_IS_DIR);