diff options
Diffstat (limited to 'rpc/rpc-lib')
| -rw-r--r-- | rpc/rpc-lib/src/rpc-transport.c | 8 | ||||
| -rw-r--r-- | rpc/rpc-lib/src/rpc-transport.h | 4 | 
2 files changed, 10 insertions, 2 deletions
diff --git a/rpc/rpc-lib/src/rpc-transport.c b/rpc/rpc-lib/src/rpc-transport.c index 2a10a3b7f80..bf0e4dfd6e9 100644 --- a/rpc/rpc-lib/src/rpc-transport.c +++ b/rpc/rpc-lib/src/rpc-transport.c @@ -632,6 +632,10 @@ rpc_transport_pollin_destroy (rpc_transport_pollin_t *pollin)                  iobref_unref (pollin->iobref);          } +        if (pollin->hdr_iobuf) { +                iobuf_unref (pollin->hdr_iobuf); +        } +          if (pollin->private) {                  /* */                  GF_FREE (pollin->private); @@ -645,7 +649,8 @@ out:  rpc_transport_pollin_t *  rpc_transport_pollin_alloc (rpc_transport_t *this, struct iovec *vector, -                            int count, struct iobref *iobref, void *private) +                            int count, struct iobuf *hdr_iobuf, +                            struct iobref *iobref, void *private)  {          rpc_transport_pollin_t *msg = NULL;          msg = GF_CALLOC (1, sizeof (*msg), gf_common_mt_rpc_trans_pollin_t); @@ -662,6 +667,7 @@ rpc_transport_pollin_alloc (rpc_transport_t *this, struct iovec *vector,          msg->count = count;          msg->iobref = iobref_ref (iobref);          msg->private = private; +        msg->hdr_iobuf = iobuf_ref (hdr_iobuf);  out:          return msg; diff --git a/rpc/rpc-lib/src/rpc-transport.h b/rpc/rpc-lib/src/rpc-transport.h index c5e7755ff8e..9db24c09f4e 100644 --- a/rpc/rpc-lib/src/rpc-transport.h +++ b/rpc/rpc-lib/src/rpc-transport.h @@ -168,6 +168,7 @@ struct rpc_transport_pollin {          char vectored;          void *private;          struct iobref *iobref; +        struct iobuf  *hdr_iobuf;          char is_reply;  };  typedef struct rpc_transport_pollin rpc_transport_pollin_t; @@ -289,7 +290,8 @@ rpc_transport_get_myaddr (rpc_transport_t *this, char *peeraddr, int addrlen,  rpc_transport_pollin_t *  rpc_transport_pollin_alloc (rpc_transport_t *this, struct iovec *vector, -                            int count, struct iobref *iobref, void *private); +                            int count, struct iobuf *hdr_iobuf, +                            struct iobref *iobref, void *private);  void  rpc_transport_pollin_destroy (rpc_transport_pollin_t *pollin);  | 
