+
+ if(*result == DBUS_RELEASE_NAME_REPLY_RELEASED)
+ {
+ const char* name;
+
+ name = (const char*)registry; //get name passed in registry pointer
+ registry = bus_connection_get_registry (connection); //than take original registry address
+
+ service = bus_registry_lookup (registry, service_name);
+ if(service)
+ {
+ DBusConnection* phantom;
+
+ phantom = _bus_service_find_owner_connection(service, name);
+ if(phantom)
+ {
+ bus_service_remove_owner (service, phantom, transaction, NULL);
+ dbus_connection_unref_phantom(phantom);
+ }
+ else
+ _dbus_verbose ("Didn't find phantom connection for released name!\n");
+ }
+ }