summaryrefslogtreecommitdiffstats
path: root/src/openvpn/error.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvpn/error.h')
-rw-r--r--src/openvpn/error.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/openvpn/error.h b/src/openvpn/error.h
index 1e1f2ac..a977f51 100644
--- a/src/openvpn/error.h
+++ b/src/openvpn/error.h
@@ -354,6 +354,12 @@ ignore_sys_error (const int err)
return false;
}
+/** Convert fatal errors to nonfatal, don't touch other errors */
+static inline const unsigned int
+nonfatal(const unsigned int err) {
+ return err & M_FATAL ? (err ^ M_FATAL) | M_NONFATAL : err;
+}
+
#include "errlevel.h"
#endif