src/pEpEngine.c
branchENGINE-596
changeset 4186 9fbd6672b600
parent 4142 3053a46b8b56
child 4207 c47af107d4f5
     1.1 --- a/src/pEpEngine.c	Thu Nov 14 23:26:51 2019 +0100
     1.2 +++ b/src/pEpEngine.c	Fri Nov 15 11:03:23 2019 +0100
     1.3 @@ -5382,3 +5382,20 @@
     1.4      session->debug_color = ansi_color;
     1.5  #endif
     1.6  }
     1.7 +
     1.8 +PEP_STATUS set_all_userids_to_own(PEP_SESSION session, identity_list* id_list) {
     1.9 +    static char* ownid = NULL;
    1.10 +    PEP_STATUS status = PEP_STATUS_OK;
    1.11 +    if (!ownid) {
    1.12 +        status = get_default_own_userid(session, &ownid);
    1.13 +    }    
    1.14 +    if (status == PEP_STATUS_OK) {
    1.15 +        if (ownid) {
    1.16 +            status = set_all_userids_in_list(id_list, ownid);
    1.17 +        }
    1.18 +        else {
    1.19 +            status = PEP_UNKNOWN_ERROR;
    1.20 +        }
    1.21 +    }
    1.22 +    return status;    
    1.23 +}