diff options
| -rw-r--r-- | serial/manager.c | 9 | ||||
| -rw-r--r-- | serial/port.c | 9 | 
2 files changed, 8 insertions, 10 deletions
| diff --git a/serial/manager.c b/serial/manager.c index 0cf46a3d..3a64549d 100644 --- a/serial/manager.c +++ b/serial/manager.c @@ -885,8 +885,15 @@ static DBusHandlerResult remove_port(DBusConnection *conn,  	if (port_unregister(path) < 0)  		return err_does_not_exist(conn, msg, "Invalid RFCOMM node"); -	return send_message_and_unref(conn, +	send_message_and_unref(conn,  			dbus_message_new_method_return(msg));  + +	dbus_connection_emit_signal(conn, SERIAL_MANAGER_PATH, +			SERIAL_MANAGER_INTERFACE, "PortRemoved" , +			DBUS_TYPE_STRING, &path, +			DBUS_TYPE_INVALID); + +	return DBUS_HANDLER_RESULT_HANDLED;  }  static DBusHandlerResult connect_service(DBusConnection *conn, diff --git a/serial/port.c b/serial/port.c index 49042785..64a72ff9 100644 --- a/serial/port.c +++ b/serial/port.c @@ -196,18 +196,9 @@ static gboolean rfcomm_disconnect_cb(GIOChannel *io,  static void port_handler_unregister(DBusConnection *conn, void *data)  {  	struct rfcomm_node *node = data; -	char path[MAX_PATH_LENGTH]; -	const char *ppath = path;  	debug("Unregistered serial port: %s", node->name); -	snprintf(path, MAX_PATH_LENGTH, "%s/rfcomm%hd", SERIAL_MANAGER_PATH, node->id); - -	dbus_connection_emit_signal(conn, SERIAL_MANAGER_PATH, -			SERIAL_MANAGER_INTERFACE, "PortRemoved" , -			DBUS_TYPE_STRING, &ppath, -			DBUS_TYPE_INVALID); -  	bound_nodes = g_slist_remove(bound_nodes, node);  	rfcomm_node_free(node);  } | 
