treat init properly
This commit is contained in:
parent
b1c4fe3625
commit
3928b6bf48
@ -46,7 +46,8 @@ struct bio_bio_st
|
|||||||
{
|
{
|
||||||
BIO *peer; /* NULL if buf == NULL.
|
BIO *peer; /* NULL if buf == NULL.
|
||||||
* If peer != NULL, then peer->ptr is also a bio_bio_st,
|
* If peer != NULL, then peer->ptr is also a bio_bio_st,
|
||||||
* and its "peer" member points back to us. */
|
* and its "peer" member points back to us.
|
||||||
|
* peer != NULL iff init != 0 in the BIO. */
|
||||||
|
|
||||||
/* This is for what we write (i.e. reading uses peer's struct): */
|
/* This is for what we write (i.e. reading uses peer's struct): */
|
||||||
int closed; /* valid iff peer != NULL */
|
int closed; /* valid iff peer != NULL */
|
||||||
@ -224,6 +225,9 @@ static int bio_make_pair(BIO *bio1, BIO *bio2)
|
|||||||
b1->peer = bio2;
|
b1->peer = bio2;
|
||||||
b2->peer = bio1;
|
b2->peer = bio1;
|
||||||
|
|
||||||
|
bio1->init = 1;
|
||||||
|
bio2->init = 1;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user