summaryrefslogtreecommitdiffstats
path: root/serial
diff options
context:
space:
mode:
Diffstat (limited to 'serial')
-rw-r--r--serial/manager.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/serial/manager.c b/serial/manager.c
index 6b10c13d..cbd1ea21 100644
--- a/serial/manager.c
+++ b/serial/manager.c
@@ -145,6 +145,7 @@ static int port_register(DBusConnection *conn,
const char *path, const char *owner)
{
struct serial_port *sp;
+ DBusMessage *signal;
if (!conn || !owner)
return -EINVAL;
@@ -162,6 +163,15 @@ static int port_register(DBusConnection *conn,
return -1;
}
+ signal = dbus_message_new_signal(SERIAL_MANAGER_PATH,
+ SERIAL_MANAGER_INTERFACE, "PortCreated");
+
+ dbus_message_append_args(signal,
+ DBUS_TYPE_STRING, &path,
+ DBUS_TYPE_INVALID);
+
+ send_message_and_unref(conn, signal);
+
info("Registered serial port path:%s", path);
return 0;
@@ -220,8 +230,6 @@ static DBusHandlerResult create_port(DBusConnection *conn,
snprintf(port_path, PATH_LENGTH, SERIAL_PORT_PATH"%d", next_id++);
- /* FIXME: Send signal */
-
if (port_register(conn, port_path, dbus_message_get_sender(msg)) < 0) {
dbus_message_unref(reply);
return err_failed(conn, msg, "D-Bus path registration failed");