[telepathy-gabble/master] gabble_file_transfer_channel_finalize: remove UNIX socket
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Mon Mar 30 07:16:06 PDT 2009
---
src/ft-channel.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/src/ft-channel.c b/src/ft-channel.c
index ba9daeb..910e283 100644
--- a/src/ft-channel.c
+++ b/src/ft-channel.c
@@ -24,6 +24,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
@@ -770,9 +771,17 @@ gabble_file_transfer_channel_finalize (GObject *object)
GabbleFileTransferChannel *self = GABBLE_FILE_TRANSFER_CHANNEL (object);
/* free any data held directly by the object here */
+ if (self->priv->socket_path != NULL)
+ {
+ if (g_unlink (self->priv->socket_path) != 0)
+ {
+ DEBUG ("unlink failed: %s", g_strerror (errno));
+ }
+ }
+ g_free (self->priv->socket_path);
+
g_free (self->priv->object_path);
g_free (self->priv->filename);
- g_free (self->priv->socket_path);
g_free (self->priv->content_type);
g_free (self->priv->content_hash);
g_free (self->priv->description);
--
1.5.6.5
More information about the telepathy-commits
mailing list