summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2016-09-07 08:56:59 -0700
committerOndrej Holy <oholy@redhat.com>2016-09-12 14:25:05 +0200
commit47b10c6a94a08efc7ce84e121641a4f77bffd5e0 (patch)
treee22fb65f2c9ba67adab632eb556c9a063a05af83
parentf4b7547f3b7498a27e1d6ec5ebfde54e7c77aebc (diff)
downloadgvfs-47b10c6a94a08efc7ce84e121641a4f77bffd5e0.tar.gz
mtp: Use a less spamming function for the heartbeat call
Dump_Device_Info spews a lot of stuff to stderr which ends up getting captured on systemd based distros. Let's use a simpler function that doesn't spew everywhere. https://bugzilla.gnome.org/show_bug.cgi?id=770916
-rw-r--r--daemon/gvfsbackendmtp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/daemon/gvfsbackendmtp.c b/daemon/gvfsbackendmtp.c
index 09eed947..2338235f 100644
--- a/daemon/gvfsbackendmtp.c
+++ b/daemon/gvfsbackendmtp.c
@@ -813,7 +813,10 @@ static gboolean
mtp_heartbeat (GVfsBackendMtp *backend)
{
if (g_mutex_trylock (&backend->mutex)) {
- LIBMTP_Dump_Device_Info(backend->device);
+ char *name = LIBMTP_Get_Friendlyname (backend->device);
+ if (name) {
+ free (name);
+ }
g_mutex_unlock (&backend->mutex);
}
return TRUE;