~ken-vandine/libindicate/with_mono_and_python_bindings-packaging

« back to all changes in this revision

Viewing changes to libindicate/listener.c

  • Committer: Sebastien Bacher
  • Date: 2010-02-09 15:44:29 UTC
  • mfrom: (223.2.39 ubuntu)
  • Revision ID: seb128@ubuntu.com-20100209154429-hir1g85k3zxsxsi2
Tags: 0.3.1-0ubuntu2
releasing version 0.3.1-0ubuntu2

Show diffs side-by-side

added added

removed removed

Lines of Context:
394
394
        return;
395
395
}
396
396
 
 
397
/* This is the callback for when the proxy, which is attached
 
398
   to the name owner, is destroy (they fell off the bus) we handle
 
399
   that and free up our memory too. */
 
400
void
 
401
proxy_destroyed (GObject * proxy, gpointer user_data)
 
402
{
 
403
        proxy_t * proxyt = (proxy_t *)user_data;
 
404
        proxyt->proxy = NULL; /* Clear this so we don't get a double free on this guy */
 
405
        proxy_struct_destroy(proxyt);
 
406
        return;
 
407
}
 
408
 
397
409
gboolean
398
410
todo_idle (gpointer data)
399
411
{
461
473
                                                        INDICATE_DBUS_IFACE,
462
474
                                                        &error);
463
475
 
464
 
        g_free(todo);
465
 
 
466
476
        if (error != NULL) {
467
477
                g_warning("Unable to create proxy for %s", proxyt->name);
468
478
                g_error_free(error);
469
479
                return TRUE;
470
480
        }
471
481
 
 
482
        g_signal_connect(G_OBJECT(proxyt->proxy), "destroy", G_CALLBACK(proxy_destroyed), proxyt);
 
483
 
472
484
        /* Making sure the server has the proxy as well */
473
485
        proxyt->server.proxy = proxyt->proxy;
474
486