+ if (status < 0) {
+ /*
+ * Save this error for the next _next call. Assume that
+ * this component always appends error causes when
+ * returning an error status code, which will cause the
+ * current thread error to be non-NULL.
+ */
+ muxer_msg_iter->next_saved_error = bt_current_thread_take_error();
+ BT_ASSERT(muxer_msg_iter->next_saved_error);
+ muxer_msg_iter->next_saved_status = status;
+ }
+