aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.cpp3
-rw-r--r--src/usb-manager.cpp6
2 files changed, 3 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 2e428f9..7d6eb5f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -29,9 +29,6 @@
int
main(int /*argc*/, char** /*argv*/)
{
-#warning NB the next line turns on verbose debug logging and is used for developement. Remove it before landing.
-g_assert(g_setenv("G_MESSAGES_DEBUG", "all", true));
-
// Work around a deadlock in glib's type initialization.
// It can be removed when https://bugzilla.gnome.org/show_bug.cgi?id=674885 is fixed.
g_type_ensure(G_TYPE_DBUS_CONNECTION);
diff --git a/src/usb-manager.cpp b/src/usb-manager.cpp
index 335db00..7f43520 100644
--- a/src/usb-manager.cpp
+++ b/src/usb-manager.cpp
@@ -42,7 +42,7 @@ 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));
+ g_debug("%s user responded! response %d, remember %d", G_STRLOC, int(response), int(remember_choice));
req.respond(response);
if (remember_choice && (response == AdbdClient::PKResponse::ALLOW))
write_public_key(req.public_key);
@@ -78,12 +78,12 @@ private:
S_IRUSR|S_IWUSR|S_IRGRP
);
if (fd == -1) {
- g_warning("Error opening ADB datafile: %s", g_strerror(errno));
+ g_warning("Error opening ADB datafile '%s': %s", m_public_keys_filename.c_str(), g_strerror(errno));
return;
}
// write the new public key on its own line
- std::string buf {public_key + '\n'};
+ const std::string buf {public_key + '\n'};
if (write(fd, buf.c_str(), buf.size()) == -1)
g_warning("Error writing ADB datafile: %d %s", errno, g_strerror(errno));
close(fd);