#define ngx_http_push_stream_create_output_chain(buf, pool, log) ngx_http_push_stream_create_output_chain_general(buf, pool, log, NULL)
#define ngx_http_push_stream_create_output_chain_locked(buf, pool, log, shpool) ngx_http_push_stream_create_output_chain_general(buf, pool, log, shpool)
ngx_log_error(NGX_LOG_ERR,ngx_cycle->log,0,"push stream module: worker %i intercepted a message intended for another worker process (%i) that probably died",ngx_pid,worker_msg->pid);
NGX_HTTP_PUSH_STREAM_CHECK_AND_FINALIZE_REQUEST_ON_ERROR(r->request_body->bufs,NULL,r,"push stream module: unexpected publisher message request body buffer location. please report this to the push stream module developers.");
// get and check channel id value
id=ngx_http_push_stream_get_channel_id(r,cf);
NGX_HTTP_PUSH_STREAM_CHECK_AND_FINALIZE_REQUEST_ON_ERROR(id,NULL,r,"push stream module: something goes very wrong, arrived on ngx_http_push_stream_publisher_body_handler without channel id");
NGX_HTTP_PUSH_STREAM_CHECK_AND_FINALIZE_REQUEST_ON_ERROR(id,NGX_HTTP_PUSH_STREAM_UNSET_CHANNEL_ID,r,"push stream module: something goes very wrong, arrived on ngx_http_push_stream_publisher_body_handler without channel id");
NGX_HTTP_PUSH_STREAM_CHECK_AND_FINALIZE_REQUEST_ON_ERROR(id,NGX_HTTP_PUSH_STREAM_TOO_LARGE_CHANNEL_ID,r,"push stream module: something goes very wrong, arrived on ngx_http_push_stream_publisher_body_handler with channel id too large");
// just find the channel. if it's not there, NULL and return error.
NGX_HTTP_PUSH_STREAM_CHECK_AND_FINALIZE_REQUEST_ON_ERROR(channel,NULL,r,"push stream module: something goes very wrong, arrived on ngx_http_push_stream_publisher_body_handler without created channel");
// this buffer will get copied to shared memory in a few lines,
// so it does't matter what pool we make it in.
}elseif(r->request_body->bufs->buf!=NULL){// everything in the first buffer, please
buf=r->request_body->bufs->buf;
}elseif(r->request_body->bufs->next!=NULL){
buf=r->request_body->bufs->next->buf;
}else{
ngx_log_error(NGX_LOG_ERR,(r)->connection->log,0,"push stream module: unexpected publisher message request body buffer location. please report this to the push stream module developers.");
NGX_HTTP_PUSH_STREAM_PUBLISHER_CHECK_LOCKED(ngx_http_push_stream_broadcast_status_locked(channel,NGX_HTTP_GONE,&NGX_HTTP_PUSH_STREAM_HTTP_STATUS_410,r->connection->log,shpool),NGX_ERROR,r,"push stream module: unable to send current subscribers a 410 Gone response",shpool);