diff options
Diffstat (limited to 'network')
-rw-r--r-- | network/server.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/network/server.c b/network/server.c index 1eeddb82..754a37dc 100644 --- a/network/server.c +++ b/network/server.c @@ -717,7 +717,7 @@ static DBusHandlerResult enable(DBusConnection *conn, DBusMessage *msg, void *data) { struct network_server *ns = data; - DBusMessage *reply; + DBusMessage *reply, *signal; int err; if (ns->io) @@ -740,6 +740,11 @@ static DBusHandlerResult enable(DBusConnection *conn, store_property(&ns->src, ns->id, "enabled", "1"); + signal = dbus_message_new_signal(ns->path, + NETWORK_SERVER_INTERFACE, "Enabled"); + + send_message_and_unref(conn, signal); + return send_message_and_unref(conn, reply); } @@ -747,7 +752,7 @@ static DBusHandlerResult disable(DBusConnection *conn, DBusMessage *msg, void *data) { struct network_server *ns = data; - DBusMessage *reply; + DBusMessage *reply, *signal; reply = dbus_message_new_method_return(msg); if (!reply) @@ -768,6 +773,11 @@ static DBusHandlerResult disable(DBusConnection *conn, store_property(&ns->src, ns->id, "enabled", "0"); + signal = dbus_message_new_signal(ns->path, + NETWORK_SERVER_INTERFACE, "Disabled"); + + send_message_and_unref(conn, signal); + return send_message_and_unref(conn, reply); } |