The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
src
lib
bio
fd_read.h
Go to the documentation of this file.
1
/*
2
* Common finalization code for the read functions.
3
*
4
* This is in a header file because of "goto retry" in fd_errno.h.
5
*
6
* @todo - do we want the callbacks to notify the _previous_ BIO in the chain? That way the top-level
7
* BIO can notify the application.
8
*/
9
if
(rcode > 0) {
10
/*
11
* We weren't blocked, so we're still not blocked.
12
*/
13
if
(!
my
->info.read_blocked) {
14
return
rcode;
15
}
16
17
/*
18
* We were blocked. Since we just read data, we're now unblocked.
19
*/
20
my
->info.read_blocked =
false
;
21
22
/*
23
* Call the "resume" function when we transition to being unblocked.
24
*/
25
if
(
my
->cb.read_resume) {
26
int
error;
27
28
error =
my
->cb.read_resume((
fr_bio_t
*)
my
);
29
if
(error < 0)
return
error;
30
}
31
32
return
rcode;
33
}
34
35
/*
36
* Don't check for rcode==0, the caller has to do that. This is because
37
* read of 0 is different for datagram and stream sockets.
38
*/
39
40
#undef flag_blocked
41
#define flag_blocked read_blocked
42
#include "
fd_errno.h
"
fr_bio_s
Definition:
base.h:112
fd_errno.h
my
fr_bio_shutdown & my
Definition:
fd_errno.h:59
Generated by
1.9.1