Attempting to fix the empty user_id problem for IOS-1960 sync
authorKrista 'DarthMama' Bennett <krista@pep.foundation>
Tue, 19 Nov 2019 14:56:26 +0100
branchsync
changeset 4207c47af107d4f5
parent 4206 785f67d4cab3
child 4208 0edca795564a
Attempting to fix the empty user_id problem for IOS-1960
src/identity_list.c
src/pEpEngine.c
     1.1 --- a/src/identity_list.c	Mon Nov 18 23:47:41 2019 +0100
     1.2 +++ b/src/identity_list.c	Tue Nov 19 14:56:26 2019 +0100
     1.3 @@ -136,6 +136,9 @@
     1.4  }
     1.5  
     1.6  PEP_STATUS set_all_userids_in_list(identity_list* id_list, const char* user_id) {
     1.7 +    if (!user_id || user_id[0] = '\0')
     1.8 +        return PEP_ILLEGAL_VALUE;
     1.9 +        
    1.10      identity_list* curr_list = id_list;
    1.11      
    1.12      while (curr_list) {
     2.1 --- a/src/pEpEngine.c	Mon Nov 18 23:47:41 2019 +0100
     2.2 +++ b/src/pEpEngine.c	Tue Nov 19 14:56:26 2019 +0100
     2.3 @@ -5393,9 +5393,6 @@
     2.4          if (ownid) {
     2.5              status = set_all_userids_in_list(id_list, ownid);
     2.6          }
     2.7 -        else {
     2.8 -            status = PEP_UNKNOWN_ERROR;
     2.9 -        }
    2.10      }
    2.11      return status;    
    2.12  }