src/pEpEngine.c
changeset 1819 b3e57d741b15
parent 1806 e65e979be062
child 1853 a86d6290d493
     1.1 --- a/src/pEpEngine.c	Fri Jun 02 18:35:21 2017 +0200
     1.2 +++ b/src/pEpEngine.c	Sat Jun 03 11:08:14 2017 +0200
     1.3 @@ -843,6 +843,12 @@
     1.4      session->keep_sync_msg = enable;
     1.5  }
     1.6  
     1.7 +DYNAMIC_API void config_service_log(PEP_SESSION session, bool enable)
     1.8 +{
     1.9 +    assert(session);
    1.10 +    session->service_log = enable;
    1.11 +}
    1.12 +
    1.13  DYNAMIC_API PEP_STATUS log_event(
    1.14          PEP_SESSION session,
    1.15          const char *title,
    1.16 @@ -883,6 +889,24 @@
    1.17      return ERROR(status);
    1.18  }
    1.19  
    1.20 +DYNAMIC_API PEP_STATUS log_service(
    1.21 +        PEP_SESSION session,
    1.22 +        const char *title,
    1.23 +        const char *entity,
    1.24 +        const char *description,
    1.25 +        const char *comment
    1.26 +    )
    1.27 +{
    1.28 +    assert(session);
    1.29 +    if (!session)
    1.30 +        return PEP_ILLEGAL_VALUE;
    1.31 +
    1.32 +    if (session->service_log)
    1.33 +        return log_event(session, title, entity, description, comment);
    1.34 +    else
    1.35 +        return PEP_STATUS_OK;
    1.36 +}
    1.37 +
    1.38  DYNAMIC_API PEP_STATUS trustword(
    1.39              PEP_SESSION session, uint16_t value, const char *lang,
    1.40              char **word, size_t *wsize
    1.41 @@ -1283,8 +1307,6 @@
    1.42                                   const char* old_fpr, 
    1.43                                   const char* new_fpr) 
    1.44  {
    1.45 -    PEP_STATUS status = PEP_STATUS_OK;
    1.46 -    
    1.47      assert(old_fpr);
    1.48      assert(new_fpr);
    1.49