src/sync_send_actions.c
branchkeysync
changeset 955 060272dfaaeb
parent 951 dec407deb10e
child 985 087d5d60c082
     1.1 --- a/src/sync_send_actions.c	Sun Jul 31 21:25:22 2016 +0200
     1.2 +++ b/src/sync_send_actions.c	Mon Aug 01 09:14:47 2016 +0200
     1.3 @@ -113,6 +113,7 @@
     1.4      free(payload);
     1.5      free_message(_message);
     1.6      free_identity(me);
     1.7 +    free_identity(partner);
     1.8      return status;
     1.9  }
    1.10  
    1.11 @@ -218,6 +219,7 @@
    1.12      free(payload);
    1.13      free_message(_message);
    1.14      free_identity(me);
    1.15 +    free_identity(partner);
    1.16      return status;
    1.17  }
    1.18  
    1.19 @@ -244,6 +246,7 @@
    1.20      char *payload = NULL;
    1.21      message *_message = NULL;
    1.22      pEp_identity *me = NULL;
    1.23 +    identity_list *kl = NULL;
    1.24  
    1.25      assert(session);
    1.26      assert(!partner);
    1.27 @@ -289,6 +292,12 @@
    1.28      if (Identity_from_Struct(me, &msg->header.me) == NULL)
    1.29          goto enomem;
    1.30  
    1.31 +    status = own_identities_retrieve(session, &kl);
    1.32 +    if (status != PEP_STATUS_OK)
    1.33 +        goto error;
    1.34 +    if (IdentityList_from_identity_list(kl, &msg->ownIdentities) == NULL)
    1.35 +        goto enomem;
    1.36 +
    1.37      if (asn_check_constraints(&asn_DEF_GroupKeys, msg, NULL, NULL)) {
    1.38          status = PEP_CONTRAINTS_VIOLATED;
    1.39          goto error;
    1.40 @@ -314,6 +323,7 @@
    1.41      free_message(_message);
    1.42      ASN_STRUCT_FREE(asn_DEF_GroupKeys, msg);
    1.43      free_identity(partner);
    1.44 +    free_identity_list(kl);
    1.45      return status;
    1.46  
    1.47  enomem:
    1.48 @@ -323,6 +333,8 @@
    1.49      free(payload);
    1.50      free_message(_message);
    1.51      free_identity(me);
    1.52 +    free_identity(partner);
    1.53 +    free_identity_list(kl);
    1.54      return status;
    1.55  }
    1.56