X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fdbus-socket.c;h=3ec78a0f4c2292759807cc615cc385c3a83cddbe;hb=9131f660eedb29d18a29e6efff49c485e683c56c;hp=9406bb294305944d5eebd63decef1865a41924e1;hpb=d6c9574fb558d9e304699b1cc7522c3b133adfc9;p=elogind.git diff --git a/src/dbus-socket.c b/src/dbus-socket.c index 9406bb294..3ec78a0f4 100644 --- a/src/dbus-socket.c +++ b/src/dbus-socket.c @@ -24,6 +24,7 @@ #include "dbus-unit.h" #include "dbus-socket.h" #include "dbus-execute.h" +#include "dbus-common.h" #define BUS_SOCKET_INTERFACE \ " \n" \ @@ -60,14 +61,29 @@ BUS_UNIT_INTERFACE \ BUS_SOCKET_INTERFACE \ BUS_PROPERTIES_INTERFACE \ + BUS_PEER_INTERFACE \ BUS_INTROSPECTABLE_INTERFACE \ "\n" -const char bus_socket_interface[] = BUS_SOCKET_INTERFACE; +#define INTERFACES_LIST \ + BUS_UNIT_INTERFACES_LIST \ + "org.freedesktop.systemd1.Socket\0" + +const char bus_socket_interface[] _introspect_("Socket") = BUS_SOCKET_INTERFACE; + +const char bus_socket_invalidating_properties[] = + "ExecStartPre\0" + "ExecStartPost\0" + "ExecStopPre\0" + "ExecStopPost\0" + "ControlPID\0" + "NAccepted\0" + "NConnections\0"; static DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_socket_append_bind_ipv6_only, socket_address_bind_ipv6_only, SocketAddressBindIPv6Only); DBusHandlerResult bus_socket_message_handler(Unit *u, DBusConnection *c, DBusMessage *message) { + const BusProperty properties[] = { BUS_UNIT_PROPERTIES, { "org.freedesktop.systemd1.Socket", "BindIPv6Only", bus_socket_append_bind_ipv6_only, "s", &u->socket.bind_ipv6_only }, @@ -95,8 +111,10 @@ DBusHandlerResult bus_socket_message_handler(Unit *u, DBusConnection *c, DBusMes { "org.freedesktop.systemd1.Socket", "MaxConnections", bus_property_append_unsigned, "u", &u->socket.max_connections }, { "org.freedesktop.systemd1.Socket", "NConnections", bus_property_append_unsigned, "u", &u->socket.n_connections }, { "org.freedesktop.systemd1.Socket", "NAccepted", bus_property_append_unsigned, "u", &u->socket.n_accepted }, + { "org.freedesktop.systemd1.Socket", "MessageQueueMaxMessages", bus_property_append_long,"t", &u->socket.mq_maxmsg }, + { "org.freedesktop.systemd1.Socket", "MessageQueueMessageSize", bus_property_append_long,"t", &u->socket.mq_msgsize }, { NULL, NULL, NULL, NULL, NULL } }; - return bus_default_message_handler(u->meta.manager, c, message, INTROSPECTION, properties); + return bus_default_message_handler(c, message, INTROSPECTION, INTERFACES_LIST, properties); }