- bt_put(self_port);
-}
-
-BT_HIDDEN
-void muxer_port_disconnected(struct bt_private_component *priv_comp,
- struct bt_private_port *priv_port)
-{
- struct bt_port *port = bt_port_from_private(priv_port);
- struct muxer_comp *muxer_comp =
- bt_private_component_get_user_data(priv_comp);
-
- assert(port);
- assert(muxer_comp);
- BT_LOGD("Port disconnected: "
- "comp-addr=%p, muxer-comp-addr=%p, port-addr=%p, "
- "port-name=\"%s\"", priv_comp, muxer_comp,
- port, bt_port_get_name(port));
-
- /*
- * There's nothing special to do when a port is disconnected
- * because this component deals with upstream notification
- * iterators which were already created thanks to connected
- * ports. The fact that the port is disconnected does not cancel
- * the upstream notification iterators created using its
- * connection: they still exist, even if the connection is dead.
- * The only way to remove an upstream notification iterator is
- * for its "next" operation to return
- * BT_NOTIFICATION_ITERATOR_STATUS_END.
- */
- if (bt_port_get_type(port) == BT_PORT_TYPE_INPUT) {
- /* One more available input port */
- muxer_comp->available_input_ports++;
- BT_LOGD("Leaving disconnected input port available for future connections: "
- "comp-addr=%p, muxer-comp-addr=%p, port-addr=%p, "
- "port-name=\"%s\", avail-input-port-count=%zu",
- priv_comp, muxer_comp, port, bt_port_get_name(port),
- muxer_comp->available_input_ports);
- }
-
- bt_put(port);