[gnome-user-share] obex: Remove temp files when rejecting transfers
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-user-share] obex: Remove temp files when rejecting transfers
- Date: Thu, 14 Nov 2013 23:40:48 +0000 (UTC)
commit 2e2e39cb05c3eae9a9069550c3e4aa215d10993c
Author: Bastien Nocera <hadess hadess net>
Date: Fri Nov 15 00:38:02 2013 +0100
obex: Remove temp files when rejecting transfers
src/obexpush.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/obexpush.c b/src/obexpush.c
index f514db1..8a86789 100644
--- a/src/obexpush.c
+++ b/src/obexpush.c
@@ -26,6 +26,7 @@
#include "config.h"
#include <glib.h>
+#include <glib/gstdio.h>
#include <glib/gi18n.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
@@ -182,6 +183,11 @@ show_notification (const char *filename)
static void
reject_transfer (GDBusMethodInvocation *invocation)
{
+ const char *filename;
+
+ filename = g_object_get_data (G_OBJECT (invocation), "temp-filename");
+ g_remove (filename);
+
g_dbus_method_invocation_return_dbus_error (invocation,
"org.bluez.obex.Error.Rejected", "Not Authorized");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]