Deleted Added
1
2/*
3 * Copyright (C) NGINX, Inc.
4 */
5
6#include <stdlib.h>
7
8#include "nxt_main.h"

--- 5002 unchanged lines hidden (view full) ---

5011
5012
5013static int
5014nxt_unit_process_port_msg_impl(nxt_unit_ctx_t *ctx, nxt_unit_port_t *port)
5015{
5016 int rc;
5017 nxt_unit_impl_t *lib;
5018 nxt_unit_read_buf_t *rbuf;
5019
5020 rbuf = nxt_unit_read_buf_get(ctx);
5021 if (nxt_slow_path(rbuf == NULL)) {
5022 return NXT_UNIT_ERROR;
5023 }
5024
5025 lib = nxt_container_of(ctx->unit, nxt_unit_impl_t, unit);
5026
5027 if (port == lib->shared_port) {
5028 rc = nxt_unit_shared_port_recv(ctx, port, rbuf);
5029
5030 } else {
5031 rc = nxt_unit_ctx_port_recv(ctx, port, rbuf);
5032 }
5033
5034 if (rc != NXT_UNIT_OK) {

--- 8 unchanged lines hidden (view full) ---

5043
5044 rc = nxt_unit_process_pending_rbuf(ctx);
5045 if (nxt_slow_path(rc == NXT_UNIT_ERROR)) {
5046 return NXT_UNIT_ERROR;
5047 }
5048
5049 nxt_unit_process_ready_req(ctx);
5050
5051 return rc;
5052}
5053
5054
5055void
5056nxt_unit_done(nxt_unit_ctx_t *ctx)
5057{
5058 nxt_unit_ctx_release(ctx);

--- 1647 unchanged lines hidden ---