return FALSE;
}
+#ifdef ENABLE_KDBUS_TRANSPORT
+static void mini_vtable_dummy_func(DBusServer *server)
+{
+ // Used to prevent assert errors. Pointer to function is passed to
+ // DBusServerVTable which is passed to server->vtable in
+ // dbus_server_init_mini function.
+}
+
+DBusServer*
+dbus_server_init_mini (char* address)
+{
+ DBusServer *server;
+
+ static const DBusServerVTable dbus_server_init_mini_vtable = {
+ mini_vtable_dummy_func,
+ mini_vtable_dummy_func
+ };
+
+ server = dbus_new0(struct DBusServer, 1);
+ if(server == NULL)
+ return NULL;
+
+ memset(server, 0, sizeof(struct DBusServer));
+ _dbus_rmutex_new_at_location (&server->mutex);
+ if (server->mutex == NULL)
+ goto failed;
+ server->address = address;
+
+ server->vtable = &dbus_server_init_mini_vtable;
+
+ _dbus_atomic_inc (&server->refcount);
+
+ server->watches = _dbus_watch_list_new ();
+ if (server->watches == NULL)
+ goto failed;
+
+ server->timeouts = _dbus_timeout_list_new();
+ if (server->timeouts == NULL)
+ goto failed;
+
+ return server;
+
+failed:
+ dbus_free(server);
+ return NULL;
+}
+#endif
+
+
/**
* Finalizes the members of the DBusServer base class.
* Chained up to by subclass finalizers.
{
_dbus_return_if_fail (server != NULL);
-#ifdef DBUS_DISABLE_CHECKS
- _dbus_atomic_inc (&server->refcount);
-#else
- {
- dbus_int32_t old_refcount = _dbus_atomic_inc (&server->refcount);
-
- _dbus_return_if_fail (old_refcount > 0);
- }
-#endif
-
+ dbus_server_ref (server);
SERVER_LOCK (server);
_dbus_assert (server->vtable->disconnect != NULL);