src/keymanagement.c
branchsync
changeset 3056 924a5dfb5367
parent 3017 34a733193f47
child 3057 fff5fb5e01fe
     1.1 --- a/src/keymanagement.c	Sat Oct 06 08:19:14 2018 +0200
     1.2 +++ b/src/keymanagement.c	Mon Oct 15 21:35:08 2018 +0200
     1.3 @@ -1118,13 +1118,16 @@
     1.4  }
     1.5  
     1.6  DYNAMIC_API PEP_STATUS do_keymanagement(
     1.7 -        PEP_SESSION session,
     1.8          retrieve_next_identity_t retrieve_next_identity,
     1.9          void *management
    1.10      )
    1.11  {
    1.12 +    PEP_SESSION session;
    1.13      pEp_identity *identity;
    1.14 -    PEP_STATUS status;
    1.15 +    PEP_STATUS status = init(&session, NULL, NULL);
    1.16 +    assert(!status);
    1.17 +    if (status)
    1.18 +        return status;
    1.19  
    1.20      assert(session && retrieve_next_identity);
    1.21      if (!(session && retrieve_next_identity))
    1.22 @@ -1153,7 +1156,7 @@
    1.23      }
    1.24  
    1.25      log_event(session, "keymanagement thread shutdown", "pEp engine", NULL, NULL);
    1.26 -
    1.27 +    release(session);
    1.28      return PEP_STATUS_OK;
    1.29  }
    1.30