~larsu/notify-osd/lp1319983

« back to all changes in this revision

Viewing changes to src/dbus.c

Watch "NameLost" signal on DBus and exit if received.

Approved by Lars Uebernickel, Michał Sawicz, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
 
68
68
        proxy = dbus_g_proxy_new_for_name (connection,
69
69
                                           "org.freedesktop.DBus",
70
 
                                           "/org/freedesktop/Dbus",
 
70
                                           "/org/freedesktop/DBus",
71
71
                                           "org.freedesktop.DBus");
72
72
        error = NULL;
73
73
        if (!dbus_g_proxy_call (proxy,
83
83
                           "Got error \"%s\"\n",
84
84
                           error->message);
85
85
                g_error_free (error);
 
86
                g_object_unref (proxy);
86
87
                return NULL;
87
88
        }
88
89
 
 
90
        g_object_unref (proxy);
 
91
 
89
92
        if (request_name_result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER)
90
93
        {
91
94
                g_warning ("Another instance has already registered %s", service_name);