#include "empathy-marshal.h"
+#include "extensions/extensions.h"
+
#define DEBUG_FLAG EMPATHY_DEBUG_DISPATCHER
#include <libempathy/empathy-debug.h>
EmpathyDispatchOperationPriv *priv = GET_PRIV (self);
GQuark channel_type;
+ /* The error will be handled in empathy_dispatch_operation_invalidated */
+ if (error != NULL)
+ return;
+
g_assert (channel == priv->channel);
/* If the channel wrapper is defined, we assume it's ready */
{
priv->ready_handler = g_signal_connect (chat, "notify::ready",
G_CALLBACK (empathy_dispatcher_operation_tp_chat_ready_cb), self);
- goto readying;
+ return;
}
}
priv->channel_wrapper = G_OBJECT (call);
}
- else if (channel_type == EMP_IFACE_QUARK_CHANNEL_TYPE_FILE_TRANSFER)
+ else if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_FILE_TRANSFER)
{
EmpathyTpFile *file = empathy_tp_file_new (channel);
priv->channel_wrapper = G_OBJECT (file);
ready:
empathy_dispatch_operation_set_status (self,
EMPATHY_DISPATCHER_OPERATION_STATE_PENDING);
-readying:
- return;
}
EmpathyDispatchOperation *
g_signal_emit (operation, signals[APPROVED], 0);
}
- else
+ else if (priv->status < EMPATHY_DISPATCHER_OPERATION_STATE_APPROVING)
{
DEBUG ("Pre-approving operation %s",
empathy_dispatch_operation_get_object_path (operation));
priv->approved = TRUE;
}
+ else
+ {
+ DEBUG (
+ "Ignoring approval for %s as it's already past the approval stage",
+ empathy_dispatch_operation_get_object_path (operation));
+ }
}
/* Returns whether or not the operation was successfully claimed */