diff -r 43db1100ebd2 -r a537bef47d07 src/pEpEngine.c --- a/src/pEpEngine.c Thu May 11 17:39:31 2017 +0200 +++ b/src/pEpEngine.c Fri May 12 10:39:17 2017 +0200 @@ -2334,19 +2334,30 @@ return session->errorstack; } +DYNAMIC_API void clear_errorstack(PEP_SESSION session) +{ + free_stringlist(session->errorstack); + session->errorstack = new_stringlist(NULL); +} + #else static stringlist_t* dummy_errorstack = NULL; DYNAMIC_API const stringlist_t* get_errorstack(PEP_SESSION session) { - if(dummy_errorstack == NULL) - { - dummy_errorstack = new_stringlist("( Please recompile pEpEngine with -DDEBUG_ERRORSTACK )"); - } - + if(dummy_errorstack == NULL) + { + dummy_errorstack = new_stringlist("( Please recompile pEpEngine with -DDEBUG_ERRORSTACK )"); + } + return dummy_errorstack; } +DYNAMIC_API void clear_errorstack(PEP_SESSION session) +{ + // nothing to do here +} + #endif