src/keymanagement.c
changeset 1853 a86d6290d493
parent 1799 1e46b8759248
child 1860 1975a3b9bc37
child 1945 9503c962f746
     1.1 --- a/src/keymanagement.c	Mon Jun 12 22:37:40 2017 +0200
     1.2 +++ b/src/keymanagement.c	Tue Jun 13 21:15:16 2017 +0200
     1.3 @@ -91,7 +91,7 @@
     1.4      assert(!EMPTYSTR(identity->address));
     1.5  
     1.6      if (!(session && identity && !EMPTYSTR(identity->address)))
     1.7 -        return ERROR(PEP_ILLEGAL_VALUE);
     1.8 +        return ADD_TO_LOG(PEP_ILLEGAL_VALUE);
     1.9  
    1.10      if (identity->me || (identity->user_id && strcmp(identity->user_id, PEP_OWN_USERID) == 0)) {
    1.11          identity->me = true;
    1.12 @@ -326,7 +326,7 @@
    1.13      free_identity(stored_identity);
    1.14      free_identity(temp_id);
    1.15      
    1.16 -    return ERROR(status);
    1.17 +    return ADD_TO_LOG(status);
    1.18  }
    1.19  
    1.20  PEP_STATUS elect_ownkey(
    1.21 @@ -416,7 +416,7 @@
    1.22      
    1.23      *is_usable = !dont_use_fpr;
    1.24      
    1.25 -    return ERROR(status);
    1.26 +    return ADD_TO_LOG(status);
    1.27  }
    1.28  
    1.29  PEP_STATUS _myself(PEP_SESSION session, pEp_identity * identity, bool do_keygen, bool ignore_flags)
    1.30 @@ -434,7 +434,7 @@
    1.31      if (!(session && identity && !EMPTYSTR(identity->address) &&
    1.32              (EMPTYSTR(identity->user_id) ||
    1.33              strcmp(identity->user_id, PEP_OWN_USERID) == 0)))
    1.34 -        return ERROR(PEP_ILLEGAL_VALUE);
    1.35 +        return ADD_TO_LOG(PEP_ILLEGAL_VALUE);
    1.36  
    1.37      identity->comm_type = PEP_ct_pEp;
    1.38      identity->me = true;
    1.39 @@ -522,7 +522,7 @@
    1.40          status = elect_ownkey(session, identity);
    1.41          assert(status == PEP_STATUS_OK);
    1.42          if (status != PEP_STATUS_OK) {
    1.43 -            return ERROR(status);
    1.44 +            return ADD_TO_LOG(status);
    1.45          }
    1.46  
    1.47          bool has_private = false;
    1.48 @@ -554,7 +554,7 @@
    1.49  
    1.50          if (status != PEP_STATUS_OK) 
    1.51          {
    1.52 -            return ERROR(status);
    1.53 +            return ADD_TO_LOG(status);
    1.54          }
    1.55      }
    1.56     
    1.57 @@ -563,7 +563,7 @@
    1.58      if (EMPTYSTR(identity->fpr) || revoked)
    1.59      {
    1.60          if(!do_keygen){
    1.61 -            return ERROR(PEP_GET_KEY_FAILED);
    1.62 +            return ADD_TO_LOG(PEP_GET_KEY_FAILED);
    1.63          }
    1.64  
    1.65          if(revoked)
    1.66 @@ -581,7 +581,7 @@
    1.67              DEBUG_LOG("generating key pair failed", "debug", buf);
    1.68              if(revoked && r_fpr)
    1.69                  free(r_fpr);
    1.70 -            return ERROR(status);
    1.71 +            return ADD_TO_LOG(status);
    1.72          }
    1.73  
    1.74          new_key_generated = true;
    1.75 @@ -592,7 +592,7 @@
    1.76                                   identity->fpr, time(NULL));
    1.77              free(r_fpr);
    1.78              if (status != PEP_STATUS_OK) {
    1.79 -                return ERROR(status);
    1.80 +                return ADD_TO_LOG(status);
    1.81              }
    1.82          }
    1.83      }
    1.84 @@ -605,7 +605,7 @@
    1.85  
    1.86          assert(status == PEP_STATUS_OK);
    1.87          if (status != PEP_STATUS_OK) {
    1.88 -            return ERROR(status);
    1.89 +            return ADD_TO_LOG(status);
    1.90          }
    1.91  
    1.92          if (status == PEP_STATUS_OK && expired) {
    1.93 @@ -633,12 +633,12 @@
    1.94          }
    1.95      }
    1.96  
    1.97 -    return ERROR(PEP_STATUS_OK);
    1.98 +    return ADD_TO_LOG(PEP_STATUS_OK);
    1.99  }
   1.100  
   1.101  DYNAMIC_API PEP_STATUS myself(PEP_SESSION session, pEp_identity * identity)
   1.102  {
   1.103 -    return ERROR(_myself(session, identity, true, false));
   1.104 +    return ADD_TO_LOG(_myself(session, identity, true, false));
   1.105  }
   1.106  
   1.107  DYNAMIC_API PEP_STATUS register_examine_function(