Lines Matching +full:1 +full:eb
14 * 1. Redistributions of source code must retain the above copyright
82 struct ebuf *eb; in hast_proto_send() local
90 ret = -1; in hast_proto_send()
107 eb = nv_hton(nv); in hast_proto_send()
108 if (eb == NULL) in hast_proto_send()
112 hdr.size = htole32((uint32_t)ebuf_size(eb)); in hast_proto_send()
113 if (ebuf_add_head(eb, &hdr, sizeof(hdr)) == -1) in hast_proto_send()
116 hptr = ebuf_data(eb, &hsize); in hast_proto_send()
117 if (proto_send(conn, hptr, hsize) == -1) in hast_proto_send()
119 if (data != NULL && proto_send(conn, dptr, size) == -1) in hast_proto_send()
134 struct ebuf *eb; in hast_proto_recv_hdr() local
137 eb = NULL; in hast_proto_recv_hdr()
140 if (proto_recv(conn, &hdr, sizeof(hdr)) == -1) in hast_proto_recv_hdr()
150 eb = ebuf_alloc(hdr.size); in hast_proto_recv_hdr()
151 if (eb == NULL) in hast_proto_recv_hdr()
153 if (ebuf_add_tail(eb, NULL, hdr.size) == -1) in hast_proto_recv_hdr()
155 hptr = ebuf_data(eb, NULL); in hast_proto_recv_hdr()
157 if (proto_recv(conn, hptr, hdr.size) == -1) in hast_proto_recv_hdr()
159 nv = nv_ntoh(eb); in hast_proto_recv_hdr()
166 if (eb != NULL) in hast_proto_recv_hdr()
167 ebuf_free(eb); in hast_proto_recv_hdr()
168 return (-1); in hast_proto_recv_hdr()
184 ret = -1; in hast_proto_recv_data()
195 if (proto_recv(conn, data, dsize) == -1) in hast_proto_recv_data()
199 ret = pipeline[ii - 1].hps_recv(res, nv, &dptr, in hast_proto_recv_data()
201 if (ret == -1) in hast_proto_recv_data()
204 ret = -1; in hast_proto_recv_data()