Make nghttp2_is_fatal public API

This commit is contained in:
Tatsuhiro Tsujikawa 2014-01-18 16:24:44 +09:00
parent 2222b5ab0d
commit b6d039e888
2 changed files with 10 additions and 5 deletions

View File

@ -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

View File

@ -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