Merged in default ENGINE-209
authorKrista Bennett <krista@pep-project.org>
Mon, 22 May 2017 09:57:49 +0200
branchENGINE-209
changeset 1806e65e979be062
parent 1805 f8990716f387
parent 1801 a04a47881059
child 1807 795d1b201b6f
Merged in default
src/pEpEngine.c
     1.1 --- a/src/pEpEngine.c	Mon May 22 09:57:18 2017 +0200
     1.2 +++ b/src/pEpEngine.c	Mon May 22 09:57:49 2017 +0200
     1.3 @@ -250,7 +250,7 @@
     1.4      _session->version = PEP_ENGINE_VERSION;
     1.5  
     1.6  #ifdef DEBUG_ERRORSTACK
     1.7 -    _session->errorstack = new_stringlist(NULL);
     1.8 +    _session->errorstack = new_stringlist("init()");
     1.9  #endif
    1.10  
    1.11      assert(LOCAL_DB);
    1.12 @@ -2411,8 +2411,11 @@
    1.13  
    1.14  DYNAMIC_API void clear_errorstack(PEP_SESSION session)
    1.15  {
    1.16 +    const int old_len = stringlist_length(session->errorstack);
    1.17 +    char buf[48];
    1.18      free_stringlist(session->errorstack);
    1.19 -    session->errorstack = new_stringlist(NULL);
    1.20 +    snprintf(buf, 47, "(%i elements cleared)", old_len);
    1.21 +    session->errorstack = new_stringlist(buf);
    1.22  }
    1.23  
    1.24  #else