~ubuntu-branches/ubuntu/precise/telepathy-mission-control-5/precise

« back to all changes in this revision

Viewing changes to src/mcd-dispatch-operation.c

ImportĀ upstreamĀ versionĀ 5.2.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
85
85
    guint finished : 1;
86
86
    gchar *handler;
87
87
    gchar *claimer;
 
88
    DBusGMethodInvocation *claim_context;
88
89
 
89
90
    /* DBUS connection */
90
91
    TpDBusDaemon *dbus_daemon;
213
214
#undef IMPLEMENT
214
215
}
215
216
 
 
217
static void
 
218
mcd_dispatch_operation_actually_finish (McdDispatchOperation *self)
 
219
{
 
220
    tp_svc_channel_dispatch_operation_emit_finished (self);
 
221
 
 
222
    if (self->priv->claim_context != NULL)
 
223
    {
 
224
        tp_svc_channel_dispatch_operation_return_from_claim (self->priv->claim_context);
 
225
        self->priv->claim_context = NULL;
 
226
    }
 
227
}
 
228
 
216
229
gboolean
217
230
_mcd_dispatch_operation_finish (McdDispatchOperation *operation)
218
231
{
228
241
    if (priv->block_finished == 0)
229
242
    {
230
243
        DEBUG ("%s/%p has finished", priv->unique_name, operation);
231
 
        tp_svc_channel_dispatch_operation_emit_finished (operation);
 
244
        mcd_dispatch_operation_actually_finish (operation);
232
245
    }
233
246
    else
234
247
    {
273
286
        return;
274
287
    }
275
288
 
 
289
    g_assert (priv->claimer == NULL);
 
290
    g_assert (priv->claim_context == NULL);
276
291
    priv->claimer = dbus_g_method_get_sender (context);
277
 
    tp_svc_channel_dispatch_operation_return_from_claim (context);
 
292
    priv->claim_context = context;
278
293
 
279
294
    _mcd_dispatch_operation_finish (MCD_DISPATCH_OPERATION (self));
280
295
}
801
816
        if (self->priv->finished)
802
817
        {
803
818
            DEBUG ("%s/%p finished", self->priv->unique_name, self);
804
 
            tp_svc_channel_dispatch_operation_emit_finished (self);
 
819
            mcd_dispatch_operation_actually_finish (self);
805
820
        }
806
821
    }
807
822
}