Lines Matching refs:peer_b

101   struct bio_bio_st *peer_b;  in bio_destroy_pair()  local
112 peer_b = peer_bio->ptr; in bio_destroy_pair()
114 assert(peer_b != NULL); in bio_destroy_pair()
115 assert(peer_b->peer == bio); in bio_destroy_pair()
117 peer_b->peer = NULL; in bio_destroy_pair()
119 assert(peer_b->buf != NULL); in bio_destroy_pair()
120 peer_b->len = 0; in bio_destroy_pair()
121 peer_b->offset = 0; in bio_destroy_pair()
153 struct bio_bio_st *b, *peer_b; in bio_read() local
164 peer_b = b->peer->ptr; in bio_read()
165 assert(peer_b != NULL); in bio_read()
166 assert(peer_b->buf != NULL); in bio_read()
168 peer_b->request = 0; // will be set in "retry_read" situation in bio_read()
174 if (peer_b->len == 0) { in bio_read()
175 if (peer_b->closed) { in bio_read()
179 if (size <= peer_b->size) { in bio_read()
180 peer_b->request = size; in bio_read()
184 peer_b->request = peer_b->size; in bio_read()
191 if (peer_b->len < size) { in bio_read()
192 size = peer_b->len; in bio_read()
203 assert(rest <= peer_b->len); in bio_read()
204 if (peer_b->offset + rest <= peer_b->size) { in bio_read()
208 chunk = peer_b->size - peer_b->offset; in bio_read()
210 assert(peer_b->offset + chunk <= peer_b->size); in bio_read()
212 OPENSSL_memcpy(buf, peer_b->buf + peer_b->offset, chunk); in bio_read()
214 peer_b->len -= chunk; in bio_read()
215 if (peer_b->len) { in bio_read()
216 peer_b->offset += chunk; in bio_read()
217 assert(peer_b->offset <= peer_b->size); in bio_read()
218 if (peer_b->offset == peer_b->size) { in bio_read()
219 peer_b->offset = 0; in bio_read()
225 peer_b->offset = 0; in bio_read()
417 struct bio_bio_st *peer_b = b->peer->ptr; in bio_ctrl() local
418 ret = (long)peer_b->len; in bio_ctrl()