Browse Source

ENGINE-936: renamed GroupCreate to GroupInvite

Release_3.1
Krista Bennett 4 months ago
parent
commit
ab46b618fb
3 changed files with 10 additions and 10 deletions
  1. +1
    -1
      codegen/distribution.fsm
  2. +8
    -8
      src/group.c
  3. +1
    -1
      src/group.h

+ 1
- 1
codegen/distribution.fsm View File

@ -26,7 +26,7 @@ protocol Distribution 2 {
fsm ManagedGroup 2 {
version 1, 0;
message GroupCreate 2, security=untrusted {
message GroupInvite 2, security=untrusted {
field Identity groupIdentity;
field Identity manager;
}


+ 8
- 8
src/group.c View File

@ -54,9 +54,9 @@ static PEP_STATUS _build_managed_group_message_payload(PEP_SESSION session,
Identity_t* other_identity_Ident = NULL;
switch (managed_group_msg_type) {
case ManagedGroup_PR_groupCreate:
group_identity_Ident = &(outdist->choice.managedgroup.choice.groupCreate.groupIdentity);
other_identity_Ident = &(outdist->choice.managedgroup.choice.groupCreate.manager);
case ManagedGroup_PR_groupInvite:
group_identity_Ident = &(outdist->choice.managedgroup.choice.groupInvite.groupIdentity);
other_identity_Ident = &(outdist->choice.managedgroup.choice.groupInvite.manager);
break;
case ManagedGroup_PR_groupDissolve:
group_identity_Ident = &(outdist->choice.managedgroup.choice.groupDissolve.groupIdentity);
@ -1271,7 +1271,7 @@ pEp_error:
return status;
}
PEP_STATUS receive_GroupCreate(PEP_SESSION session, message* msg, PEP_rating rating, GroupCreate_t* gc) {
PEP_STATUS receive_GroupInvite(PEP_SESSION session, message* msg, PEP_rating rating, GroupInvite_t* gc) {
PEP_STATUS status = PEP_STATUS_OK;
if (rating < PEP_rating_reliable)
return PEP_NO_TRUST; // Find better error
@ -1714,8 +1714,8 @@ PEP_STATUS receive_managed_group_message(PEP_SESSION session, message* msg, PEP_
return PEP_ILLEGAL_VALUE;
switch (dist->choice.managedgroup.present) {
case ManagedGroup_PR_groupCreate:
return receive_GroupCreate(session, msg, rating, &(dist->choice.managedgroup.choice.groupCreate));
case ManagedGroup_PR_groupInvite:
return receive_GroupInvite(session, msg, rating, &(dist->choice.managedgroup.choice.groupInvite));
case ManagedGroup_PR_groupDissolve:
return receive_GroupDissolve(session, msg, rating, &(dist->choice.managedgroup.choice.groupDissolve));
case ManagedGroup_PR_groupAdopted:
@ -2005,7 +2005,7 @@ DYNAMIC_API PEP_STATUS group_create(
// Ok, mail em.
if (is_me(session, manager))
status = _send_managed_group_message_to_list(session, _group, ManagedGroup_PR_groupCreate);
status = _send_managed_group_message_to_list(session, _group, ManagedGroup_PR_groupInvite);
if (group)
*group = _group;
@ -2232,7 +2232,7 @@ DYNAMIC_API PEP_STATUS group_invite_member(
status = _build_managed_group_message_payload(session, group_identity,
manager, &data, &size,
ManagedGroup_PR_groupCreate);
ManagedGroup_PR_groupInvite);
if (status != PEP_STATUS_OK)
goto pEp_free;


+ 1
- 1
src/group.h View File

@ -307,7 +307,7 @@ DYNAMIC_API PEP_STATUS group_dissolve(
*
* @ownership FIXME
*
* @note This generates a GroupCreate message even though the group already exists - this is because
* @note This generates a GroupInvite message even though the group already exists - this is because
* this is the accepted message format for invitations to potential members
*
*/


Loading…
Cancel
Save