Commit b6d039e8 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Make nghttp2_is_fatal public API

parent 2222b5ab
......@@ -2374,6 +2374,14 @@ int nghttp2_gzip_inflate(nghttp2_gzip *inflater,
*/
nghttp2_info *nghttp2_version(int least_version);
/**
* @function
*
* Returns nonzero if the :type:`nghttp2_error` library error code
* |lib_error| is fatal.
*/
int nghttp2_is_fatal(int lib_error);
#ifdef __cplusplus
}
#endif
......
......@@ -64,12 +64,9 @@ static int nghttp2_is_non_fatal(int error)
return error < 0 && error > NGHTTP2_ERR_FATAL;
}
/*
* Returns non-zero if |error| is fatal error.
*/
static int nghttp2_is_fatal(int error)
int nghttp2_is_fatal(int lib_error)
{
return error < NGHTTP2_ERR_FATAL;
return lib_error < NGHTTP2_ERR_FATAL;
}
/* Returns the pushed stream's priority based on the associated stream
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment