aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2009-05-18 20:30:08 +0800
committerCosimo Cecchi <cosimoc@gnome.org>2009-06-01 23:53:20 +0800
commit948f05b5e6b28afbfc0549efe6cc4fd55598738c (patch)
tree6b5bc21b51694908d289cb96072c3412b4912f0b /libempathy
parent28ca5c25c82b7cb8898d2d967bee88b604c109d4 (diff)
downloadgsoc2013-empathy-948f05b5e6b28afbfc0549efe6cc4fd55598738c.tar
gsoc2013-empathy-948f05b5e6b28afbfc0549efe6cc4fd55598738c.tar.gz
gsoc2013-empathy-948f05b5e6b28afbfc0549efe6cc4fd55598738c.tar.bz2
gsoc2013-empathy-948f05b5e6b28afbfc0549efe6cc4fd55598738c.tar.lz
gsoc2013-empathy-948f05b5e6b28afbfc0549efe6cc4fd55598738c.tar.xz
gsoc2013-empathy-948f05b5e6b28afbfc0549efe6cc4fd55598738c.tar.zst
gsoc2013-empathy-948f05b5e6b28afbfc0549efe6cc4fd55598738c.zip
Use the right macros to pass a gboolean as user_data
Use GPOINTER_TO_INT and GINT_TO_POINTER instead of passing the address, as that doesn't work.
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-ft-handler.c2
-rw-r--r--libempathy/empathy-tp-file.c23
2 files changed, 14 insertions, 11 deletions
diff --git a/libempathy/empathy-ft-handler.c b/libempathy/empathy-ft-handler.c
index 4a1403875..e2172bcd5 100644
--- a/libempathy/empathy-ft-handler.c
+++ b/libempathy/empathy-ft-handler.c
@@ -694,6 +694,8 @@ ft_handler_check_if_allowed (EmpathyFTHandler *handler)
TP_IFACE_CHANNEL ".TargetHandle"))
res = FALSE;
+ DEBUG ("check if FT allowed: %s", res ? "True" : "False");
+
g_object_unref (dispatcher);
return res;
diff --git a/libempathy/empathy-tp-file.c b/libempathy/empathy-tp-file.c
index a5af58b1e..6a2887251 100644
--- a/libempathy/empathy-tp-file.c
+++ b/libempathy/empathy-tp-file.c
@@ -149,11 +149,11 @@ ft_operation_close_clean (EmpathyTpFile *tp_file)
{
EmpathyTpFilePriv *priv = GET_PRIV (tp_file);
- DEBUG ("FT operation close clean");
-
if (priv->is_closed)
return;
+ DEBUG ("FT operation close clean");
+
priv->is_closed = TRUE;
if (priv->op_callback != NULL)
@@ -166,11 +166,11 @@ ft_operation_close_with_error (EmpathyTpFile *tp_file,
{
EmpathyTpFilePriv *priv = GET_PRIV (tp_file);
- DEBUG ("FT operation close with error %s", error->message);
-
if (priv->is_closed)
return;
+ DEBUG ("FT operation close with error %s", error->message);
+
priv->is_closed = TRUE;
/* close the channel if it's not cancelled already */
@@ -191,10 +191,10 @@ splice_stream_ready_cb (GObject *source,
tp_file = user_data;
- DEBUG ("Splice stream ready cb");
-
g_output_stream_splice_finish (G_OUTPUT_STREAM (source), res, &error);
+ DEBUG ("Splice stream ready cb, error %p", error);
+
if (error != NULL)
{
ft_operation_close_with_error (tp_file, error);
@@ -520,12 +520,12 @@ channel_closed_cb (TpChannel *proxy,
{
EmpathyTpFile *tp_file = EMPATHY_TP_FILE (weak_object);
EmpathyTpFilePriv *priv = GET_PRIV (tp_file);
- gboolean *cancel = user_data;
+ gboolean cancel = GPOINTER_TO_INT (user_data);
- DEBUG ("Channel is closed");
+ DEBUG ("Channel is closed, should cancel %s", cancel ? "True" : "False");
if (priv->cancellable != NULL &&
- !g_cancellable_is_cancelled (priv->cancellable) && *cancel)
+ !g_cancellable_is_cancelled (priv->cancellable) && cancel)
g_cancellable_cancel (priv->cancellable);
}
@@ -535,10 +535,11 @@ close_channel_internal (EmpathyTpFile *tp_file,
{
EmpathyTpFilePriv *priv = GET_PRIV (tp_file);
- DEBUG ("Closing channel..");
+ DEBUG ("Closing channel, should cancel %s", cancel ?
+ "True" : "False");
tp_cli_channel_call_close (priv->channel, -1,
- channel_closed_cb, &cancel, NULL, G_OBJECT (tp_file));
+ channel_closed_cb, GINT_TO_POINTER (cancel), NULL, G_OBJECT (tp_file));
}
/* GObject methods */