The internal BIO functions do not in fact look at this flag, only the outer tls_read and tls_write functions do.
Showing the changes to libavformat (1 of 1 file). Show all
Unified · Split
| @@ -702,8 +702,7 @@ static int dtls_handshake(URLContext *h) · 701 unmodified lines | ||
| 702 | 702 | int ret = 1, r0, r1; |
| 703 | 703 | TLSContext *p = h->priv_data; |
| 704 | 704 | |
| 705 | − int was_nonblock = h->flags & AVIO_FLAG_NONBLOCK; | |
| 706 | − h->flags &= ~AVIO_FLAG_NONBLOCK; | |
| 705 | + p->tls_shared.udp->flags &= ~AVIO_FLAG_NONBLOCK; | |
| 707 | 706 | |
| 708 | 707 | r0 = SSL_do_handshake(p->ssl); |
| 709 | 708 | if (r0 <= 0) { |
| @@ -724,8 +723,6 @@ static int dtls_handshake(URLContext *h) · 14 unmodified lines | ||
| 724 | 723 | ret = 0; |
| 725 | 724 | p->tls_shared.state = DTLS_STATE_FINISHED; |
| 726 | 725 | end: |
| 727 | − if (was_nonblock) | |
| 728 | − h->flags |= AVIO_FLAG_NONBLOCK; | |
| 729 | 726 | return ret; |
| 730 | 727 | } |
| 731 | 728 | |