The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
fd_errno.h
Go to the documentation of this file.
1 /*
2  * Code snippet to avoid duplication.
3  */
4 switch (errno) {
5 case EINTR:
6  /*
7  * Try a few times before giving up.
8  */
9  tries++;
10  if (tries <= my->max_tries) goto retry;
11  return 0;
12 
13 #if defined(EWOULDBLOCK) && (EWOULDBLOCK != EAGAIN)
14 case EWOULDBLOCK:
15 #endif
16 case EAGAIN:
17  /*
18  * The operation would block, return that.
19  */
20  my->flag_blocked = true;
21  return fr_bio_error(IO_WOULD_BLOCK);
22 
23 default:
24  /*
25  * Some other error, it's fatal.
26  */
27  break;
28 }
#define fr_bio_error(_x)
Definition: base.h:184