add peek error node function to make use of debug mutex

This commit is contained in:
Jacob Barthelmeh
2017-02-03 11:52:36 -07:00
parent 0b8730f0b6
commit 0f91542cf4
4 changed files with 73 additions and 9 deletions

View File

@@ -20469,13 +20469,15 @@ unsigned long wolfSSL_ERR_peek_last_error_line(const char **file, int *line)
(void)line;
(void)file;
#if defined(DEBUG_WOLFSSL)
if (line != NULL) {
*line = (int)wc_last_error_line;
{
int ret;
if ((ret = wc_PeekErrorNode(-1, file, NULL, line)) < 0) {
WOLFSSL_MSG("Issue peeking at error node in queue");
return 0;
}
return (unsigned long)ret;
}
if (file != NULL) {
*file = (char*)wc_last_error_file;
}
return wc_last_error;
#else
return (unsigned long)(0 - NOT_COMPILED_IN);
#endif