+ break;
+ case STATE_EMIT_MSG_STREAM_ACTIVITY_END:
+ if (notit->emit_stream_end_msg) {
+ /* create_msg_stream_activity_end() logs errors */
+ create_msg_stream_activity_end(notit, message);
+
+ if (!*message) {
+ status = BT_MSG_ITER_STATUS_ERROR;
+ }
+
+ goto end;
+ }
+
+ break;
+ case STATE_EMIT_MSG_STREAM_BEGINNING:
+ status = set_current_stream(notit);
+ if (status != BT_MSG_ITER_STATUS_OK) {
+ goto end;
+ }
+
+ if (notit->emit_stream_begin_msg) {
+ /* create_msg_stream_beginning() logs errors */
+ create_msg_stream_beginning(notit, message);
+
+ if (!*message) {
+ status = BT_MSG_ITER_STATUS_ERROR;
+ }
+
+ goto end;
+ }
+
+ break;
+ case STATE_EMIT_MSG_STREAM_END:
+ if (notit->emit_stream_end_msg) {
+ /* create_msg_stream_end() logs errors */
+ create_msg_stream_end(notit, message);
+
+ if (!*message) {
+ status = BT_MSG_ITER_STATUS_ERROR;
+ }
+
+ goto end;
+ }
+
+ break;
+ case STATE_DONE:
+ status = BT_MSG_ITER_STATUS_EOF;