merging in spinlock_remove sync
authorVolker Birk <vb@pep-project.org>
Mon, 28 Oct 2019 15:58:27 +0100
branchsync
changeset 4144f49072f9ffb4
parent 4141 efcda28ffd7e
parent 4143 516f9d4e7072
child 4145 908e693208e2
child 4152 d7fcdda581fd
merging in spinlock_remove
     1.1 --- a/src/blacklist.c	Fri Oct 25 15:16:54 2019 +0200
     1.2 +++ b/src/blacklist.c	Mon Oct 28 15:58:27 2019 +0100
     1.3 @@ -20,7 +20,7 @@
     1.4  
     1.5      int result;
     1.6  
     1.7 -    result = Sqlite3_step(session->blacklist_add);
     1.8 +    result = sqlite3_step(session->blacklist_add);
     1.9      switch (result) {
    1.10      case SQLITE_DONE:
    1.11          status = PEP_STATUS_OK;
    1.12 @@ -50,7 +50,7 @@
    1.13  
    1.14      int result;
    1.15  
    1.16 -    result = Sqlite3_step(session->blacklist_delete);
    1.17 +    result = sqlite3_step(session->blacklist_delete);
    1.18      switch (result) {
    1.19      case SQLITE_DONE:
    1.20          status = PEP_STATUS_OK;
    1.21 @@ -85,7 +85,7 @@
    1.22  
    1.23      int result;
    1.24  
    1.25 -    result = Sqlite3_step(session->blacklist_is_listed);
    1.26 +    result = sqlite3_step(session->blacklist_is_listed);
    1.27      switch (result) {
    1.28      case SQLITE_ROW:
    1.29          count = sqlite3_column_int(session->blacklist_is_listed, 0);
    1.30 @@ -125,7 +125,7 @@
    1.31  
    1.32      stringlist_t *_bl = _blacklist;
    1.33      do {
    1.34 -        result = Sqlite3_step(session->blacklist_retrieve);
    1.35 +        result = sqlite3_step(session->blacklist_retrieve);
    1.36          switch (result) {
    1.37          case SQLITE_ROW:
    1.38          {
     2.1 --- a/src/key_reset.c	Fri Oct 25 15:16:54 2019 +0200
     2.2 +++ b/src/key_reset.c	Mon Oct 28 15:58:27 2019 +0100
     2.3 @@ -41,7 +41,7 @@
     2.4              SQLITE_STATIC);
     2.5      sqlite3_bind_text(session->was_id_for_revoke_contacted, 2, user_id, -1,
     2.6              SQLITE_STATIC);        
     2.7 -    int result = Sqlite3_step(session->was_id_for_revoke_contacted);
     2.8 +    int result = sqlite3_step(session->was_id_for_revoke_contacted);
     2.9      switch (result) {
    2.10          case SQLITE_ROW: {
    2.11              *contacted = (sqlite3_column_int(session->was_id_for_revoke_contacted, 0) != 0);
    2.12 @@ -81,7 +81,7 @@
    2.13  
    2.14      int result;
    2.15      
    2.16 -    result = Sqlite3_step(session->set_revoke_contact_as_notified);
    2.17 +    result = sqlite3_step(session->set_revoke_contact_as_notified);
    2.18      switch (result) {
    2.19          case SQLITE_DONE:
    2.20              status = PEP_STATUS_OK;
     3.1 --- a/src/keymanagement.c	Fri Oct 25 15:16:54 2019 +0200
     3.2 +++ b/src/keymanagement.c	Mon Oct 28 15:58:27 2019 +0100
     3.3 @@ -282,7 +282,7 @@
     3.4  
     3.5      int result = -1;
     3.6      
     3.7 -    while ((result = Sqlite3_step(session->get_all_keys_for_user)) == SQLITE_ROW) {
     3.8 +    while ((result = sqlite3_step(session->get_all_keys_for_user)) == SQLITE_ROW) {
     3.9          const char* keyres = (const char *) sqlite3_column_text(session->get_all_keys_for_user, 0);
    3.10          if (keyres) {
    3.11              if (_kl)
    3.12 @@ -317,7 +317,7 @@
    3.13      sqlite3_bind_text(session->get_user_default_key, 1, user_id, 
    3.14                        -1, SQLITE_STATIC);
    3.15      
    3.16 -    const int result = Sqlite3_step(session->get_user_default_key);
    3.17 +    const int result = sqlite3_step(session->get_user_default_key);
    3.18      char* user_fpr = NULL;
    3.19      if (result == SQLITE_ROW) {
    3.20          const char* u_fpr =
    3.21 @@ -1673,7 +1673,7 @@
    3.22      
    3.23      int result;
    3.24      
    3.25 -    result = Sqlite3_step(session->own_key_is_listed);
    3.26 +    result = sqlite3_step(session->own_key_is_listed);
    3.27      switch (result) {
    3.28          case SQLITE_ROW:
    3.29              count = sqlite3_column_int(session->own_key_is_listed, 0);
    3.30 @@ -1723,7 +1723,7 @@
    3.31      sqlite3_bind_int(session->own_identities_retrieve, 1, excluded_flags);
    3.32  
    3.33      do {
    3.34 -        result = Sqlite3_step(session->own_identities_retrieve);
    3.35 +        result = sqlite3_step(session->own_identities_retrieve);
    3.36          switch (result) {
    3.37              case SQLITE_ROW:
    3.38                  address = (const char *)
    3.39 @@ -1817,7 +1817,7 @@
    3.40      sqlite3_bind_int(session->own_keys_retrieve, 1, excluded_flags);
    3.41  
    3.42      do {        
    3.43 -        result = Sqlite3_step(session->own_keys_retrieve);
    3.44 +        result = sqlite3_step(session->own_keys_retrieve);
    3.45          switch (result) {
    3.46              case SQLITE_ROW:
    3.47                  _bl = stringlist_add(_bl, (const char *)
    3.48 @@ -1958,7 +1958,7 @@
    3.49      sqlite3_bind_text(session->add_mistrusted_key, 1, fpr, -1,
    3.50              SQLITE_STATIC);
    3.51  
    3.52 -    result = Sqlite3_step(session->add_mistrusted_key);
    3.53 +    result = sqlite3_step(session->add_mistrusted_key);
    3.54      sqlite3_reset(session->add_mistrusted_key);
    3.55  
    3.56      if (result != SQLITE_DONE)
    3.57 @@ -1980,7 +1980,7 @@
    3.58      sqlite3_bind_text(session->delete_mistrusted_key, 1, fpr, -1,
    3.59              SQLITE_STATIC);
    3.60  
    3.61 -    result = Sqlite3_step(session->delete_mistrusted_key);
    3.62 +    result = sqlite3_step(session->delete_mistrusted_key);
    3.63      sqlite3_reset(session->delete_mistrusted_key);
    3.64  
    3.65      if (result != SQLITE_DONE)
    3.66 @@ -2007,7 +2007,7 @@
    3.67  
    3.68      int result;
    3.69  
    3.70 -    result = Sqlite3_step(session->is_mistrusted_key);
    3.71 +    result = sqlite3_step(session->is_mistrusted_key);
    3.72      switch (result) {
    3.73      case SQLITE_ROW:
    3.74          *mistrusted = sqlite3_column_int(session->is_mistrusted_key, 0);
     4.1 --- a/src/pEpEngine.c	Fri Oct 25 15:16:54 2019 +0200
     4.2 +++ b/src/pEpEngine.c	Mon Oct 28 15:58:27 2019 +0100
     4.3 @@ -53,7 +53,7 @@
     4.4              if (!EMPTYSTR(X_str) && X_str[0] == '-' && X_str[1] == '-')
     4.5                  fprintf(stderr, "%s\n", X_str);
     4.6              else
     4.7 -                fprintf(stderr, "%s\n", sqlite3_expanded_sql((sqlite3_stmt*)P));
     4.8 +                fprintf(stderr, "%s\n", sqlite3_expanded_sql((sqlite3_stmt*)P));    
     4.9              break;
    4.10          case SQLITE_TRACE_ROW:
    4.11              fprintf(stderr, "SQL_DEBUG: ROW - ");
    4.12 @@ -563,7 +563,7 @@
    4.13  
    4.14      int retval = 0;
    4.15  
    4.16 -    int rc = Sqlite3_step(stmt);  
    4.17 +    int rc = sqlite3_step(stmt);  
    4.18      if (rc == SQLITE_DONE || rc == SQLITE_OK || rc == SQLITE_ROW) {
    4.19          retval = 1;
    4.20      }
    4.21 @@ -614,7 +614,7 @@
    4.22  
    4.23      int retval = 0;
    4.24  
    4.25 -    int rc = Sqlite3_step(stmt);  
    4.26 +    int rc = sqlite3_step(stmt);  
    4.27      if (rc == SQLITE_DONE || rc == SQLITE_OK || rc == SQLITE_ROW) {
    4.28          retval = 1;
    4.29      }
    4.30 @@ -637,7 +637,7 @@
    4.31      sqlite3_prepare_v2(session->db, sql_query, -1, &stmt, NULL);
    4.32      int i = 0;
    4.33      int int_result = 0;
    4.34 -    while ((int_result = Sqlite3_step(stmt)) == SQLITE_ROW && i < _PEP_MAX_AFFECTED) {
    4.35 +    while ((int_result = sqlite3_step(stmt)) == SQLITE_ROW && i < _PEP_MAX_AFFECTED) {
    4.36          table_names[i++] = strdup((const char*)(sqlite3_column_text(stmt, 0)));
    4.37      }
    4.38      
    4.39 @@ -2111,13 +2111,15 @@
    4.40                  sqlite3_finalize(session->is_mistrusted_key);
    4.41                  
    4.42              if (session->db) {
    4.43 -                sqlite3_exec(        
    4.44 -                    session->db,
    4.45 -                    "PRAGMA optimize;\n",
    4.46 -                    NULL,
    4.47 -                    NULL,
    4.48 -                    NULL
    4.49 -                );
    4.50 +                if (out_last) {
    4.51 +                    sqlite3_exec(        
    4.52 +                        session->db,
    4.53 +                        "PRAGMA optimize;\n",
    4.54 +                        NULL,
    4.55 +                        NULL,
    4.56 +                        NULL
    4.57 +                    );
    4.58 +                }    
    4.59                  sqlite3_close_v2(session->db);
    4.60              }
    4.61              if (session->system_db)
    4.62 @@ -2200,7 +2202,7 @@
    4.63          sqlite3_bind_text(session->log, 4, comment, -1, SQLITE_STATIC);
    4.64      else
    4.65          sqlite3_bind_null(session->log, 4);
    4.66 -    result = Sqlite3_step(session->log);
    4.67 +    result = sqlite3_step(session->log);
    4.68      sqlite3_reset(session->log);
    4.69      
    4.70  #endif
    4.71 @@ -2255,7 +2257,7 @@
    4.72      sqlite3_bind_text(session->trustword, 1, lang, -1, SQLITE_STATIC);
    4.73      sqlite3_bind_int(session->trustword, 2, value);
    4.74  
    4.75 -    const int result = Sqlite3_step(session->trustword);
    4.76 +    const int result = sqlite3_step(session->trustword);
    4.77      if (result == SQLITE_ROW) {
    4.78          *word = strdup((const char *) sqlite3_column_text(session->trustword,
    4.79                      1));
    4.80 @@ -2452,7 +2454,7 @@
    4.81      
    4.82      sqlite3_reset(session->get_default_own_userid);
    4.83  
    4.84 -    const int result = Sqlite3_step(session->get_default_own_userid);
    4.85 +    const int result = sqlite3_step(session->get_default_own_userid);
    4.86      const char* id;
    4.87      
    4.88      switch (result) {
    4.89 @@ -2501,7 +2503,7 @@
    4.90  
    4.91      const char* tempid;
    4.92      
    4.93 -    const int result = Sqlite3_step(session->get_userid_alias_default);
    4.94 +    const int result = sqlite3_step(session->get_userid_alias_default);
    4.95      switch (result) {
    4.96      case SQLITE_ROW:
    4.97          tempid = (const char *) sqlite3_column_text(session->get_userid_alias_default, 0);
    4.98 @@ -2546,7 +2548,7 @@
    4.99      sqlite3_bind_text(session->add_userid_alias, 2, alias_id, -1,
   4.100              SQLITE_STATIC);
   4.101          
   4.102 -    result = Sqlite3_step(session->add_userid_alias);
   4.103 +    result = sqlite3_step(session->add_userid_alias);
   4.104  
   4.105      sqlite3_reset(session->add_userid_alias);
   4.106      if (result != SQLITE_DONE) {
   4.107 @@ -2583,7 +2585,7 @@
   4.108      sqlite3_bind_text(session->get_identity, 1, address, -1, SQLITE_STATIC);
   4.109      sqlite3_bind_text(session->get_identity, 2, user_id, -1, SQLITE_STATIC);
   4.110  
   4.111 -    const int result = Sqlite3_step(session->get_identity);
   4.112 +    const int result = sqlite3_step(session->get_identity);
   4.113      switch (result) {
   4.114      case SQLITE_ROW:
   4.115          _identity = new_identity(
   4.116 @@ -2650,7 +2652,7 @@
   4.117      sqlite3_bind_text(session->get_identities_by_userid, 1, user_id, -1, SQLITE_STATIC);
   4.118  
   4.119      int result = -1;
   4.120 -    while ((result = Sqlite3_step(session->get_identities_by_userid)) == SQLITE_ROW) {
   4.121 +    while ((result = sqlite3_step(session->get_identities_by_userid)) == SQLITE_ROW) {
   4.122              // "select address, fpr, username, comm_type, lang,"
   4.123              // "   identity.flags | pgp_keypair.flags,"
   4.124              // "   is_own"
   4.125 @@ -2732,7 +2734,7 @@
   4.126  
   4.127      int result = -1;
   4.128      
   4.129 -    while ((result = Sqlite3_step(session->get_identities_by_main_key_id)) == SQLITE_ROW) {
   4.130 +    while ((result = sqlite3_step(session->get_identities_by_main_key_id)) == SQLITE_ROW) {
   4.131          ident = new_identity(
   4.132                      (const char *) sqlite3_column_text(session->get_identities_by_main_key_id, 0),
   4.133                      fpr,
   4.134 @@ -2806,7 +2808,7 @@
   4.135      sqlite3_bind_text(session->get_identity_without_trust_check, 1, address, -1, SQLITE_STATIC);
   4.136      sqlite3_bind_text(session->get_identity_without_trust_check, 2, user_id, -1, SQLITE_STATIC);
   4.137  
   4.138 -    const int result = Sqlite3_step(session->get_identity_without_trust_check);
   4.139 +    const int result = sqlite3_step(session->get_identity_without_trust_check);
   4.140      switch (result) {
   4.141      case SQLITE_ROW:
   4.142          _identity = new_identity(
   4.143 @@ -2874,7 +2876,7 @@
   4.144      sqlite3_bind_text(session->get_identities_by_address, 1, address, -1, SQLITE_STATIC);
   4.145      int result;
   4.146  
   4.147 -    while ((result = Sqlite3_step(session->get_identities_by_address)) == SQLITE_ROW) {
   4.148 +    while ((result = sqlite3_step(session->get_identities_by_address)) == SQLITE_ROW) {
   4.149          //"select user_id, main_key_id, username, comm_type, lang,"
   4.150          //"   identity.flags, is_own"
   4.151          pEp_identity *ident = new_identity(
   4.152 @@ -2945,7 +2947,7 @@
   4.153      sqlite3_bind_text(session->exists_identity_entry, 2, identity->user_id, -1,
   4.154                        SQLITE_STATIC);
   4.155                    
   4.156 -    int result = Sqlite3_step(session->exists_identity_entry);
   4.157 +    int result = sqlite3_step(session->exists_identity_entry);
   4.158  
   4.159      switch (result) {
   4.160          case SQLITE_ROW: {
   4.161 @@ -2980,7 +2982,7 @@
   4.162      sqlite3_bind_text(session->exists_trust_entry, 2, identity->fpr, -1,
   4.163                        SQLITE_STATIC);
   4.164                    
   4.165 -    int result = Sqlite3_step(session->exists_trust_entry);
   4.166 +    int result = sqlite3_step(session->exists_trust_entry);
   4.167      switch (result) {
   4.168          case SQLITE_ROW: {
   4.169              // yeah yeah, I know, we could be lazy here, but it looks bad.
   4.170 @@ -3004,7 +3006,7 @@
   4.171      sqlite3_reset(session->set_pgp_keypair);
   4.172      sqlite3_bind_text(session->set_pgp_keypair, 1, fpr, -1,
   4.173              SQLITE_STATIC);
   4.174 -    result = Sqlite3_step(session->set_pgp_keypair);
   4.175 +    result = sqlite3_step(session->set_pgp_keypair);
   4.176      sqlite3_reset(session->set_pgp_keypair);
   4.177      if (result != SQLITE_DONE) {
   4.178          return PEP_CANNOT_SET_PGP_KEYPAIR;
   4.179 @@ -3026,7 +3028,7 @@
   4.180              SQLITE_STATIC);    
   4.181      sqlite3_bind_text(session->clear_trust_info, 2, fpr, -1,
   4.182              SQLITE_STATIC);
   4.183 -    result = Sqlite3_step(session->clear_trust_info);
   4.184 +    result = sqlite3_step(session->clear_trust_info);
   4.185      sqlite3_reset(session->clear_trust_info);
   4.186      if (result != SQLITE_DONE) {
   4.187          return PEP_UNKNOWN_ERROR;
   4.188 @@ -3059,7 +3061,7 @@
   4.189      sqlite3_bind_text(set_or_update, 2, identity->fpr, -1,
   4.190              SQLITE_STATIC);
   4.191      sqlite3_bind_int(set_or_update, 3, identity->comm_type);
   4.192 -    result = Sqlite3_step(set_or_update);
   4.193 +    result = sqlite3_step(set_or_update);
   4.194      assert(result == SQLITE_DONE);
   4.195      sqlite3_reset(set_or_update);
   4.196      if (result != SQLITE_DONE)
   4.197 @@ -3090,7 +3092,7 @@
   4.198      sqlite3_bind_int(set_or_update, 6, identity->major_ver);
   4.199      sqlite3_bind_int(set_or_update, 7, identity->minor_ver);
   4.200          
   4.201 -    int result = Sqlite3_step(set_or_update);
   4.202 +    int result = sqlite3_step(set_or_update);
   4.203      sqlite3_reset(set_or_update);
   4.204      if (result != SQLITE_DONE)
   4.205          return PEP_CANNOT_SET_IDENTITY;
   4.206 @@ -3120,7 +3122,7 @@
   4.207          sqlite3_bind_null(set_or_update, 3);
   4.208      sqlite3_bind_text(set_or_update, 4, identity->fpr, -1,
   4.209                        SQLITE_STATIC);
   4.210 -    int result = Sqlite3_step(set_or_update);
   4.211 +    int result = sqlite3_step(set_or_update);
   4.212      sqlite3_reset(set_or_update);
   4.213      
   4.214      if (result != SQLITE_DONE)
   4.215 @@ -3295,7 +3297,7 @@
   4.216      sqlite3_reset(session->update_trust_to_pEp);
   4.217      sqlite3_bind_text(session->update_trust_to_pEp, 1, user->user_id, -1,
   4.218              SQLITE_STATIC);
   4.219 -    int result = Sqlite3_step(session->update_trust_to_pEp);
   4.220 +    int result = sqlite3_step(session->update_trust_to_pEp);
   4.221      sqlite3_reset(session->update_trust_to_pEp);
   4.222      if (result != SQLITE_DONE)
   4.223          return PEP_CANNOT_SET_TRUST;
   4.224 @@ -3332,7 +3334,7 @@
   4.225      sqlite3_reset(session->set_as_pEp_user);
   4.226      sqlite3_bind_text(session->set_as_pEp_user, 1, user->user_id, -1,
   4.227              SQLITE_STATIC);
   4.228 -    int result = Sqlite3_step(session->set_as_pEp_user);
   4.229 +    int result = sqlite3_step(session->set_as_pEp_user);
   4.230      sqlite3_reset(session->set_as_pEp_user);
   4.231      
   4.232      if (result != SQLITE_DONE)
   4.233 @@ -3357,7 +3359,7 @@
   4.234      sqlite3_bind_text(session->set_pEp_version, 4, ident->user_id, -1,
   4.235              SQLITE_STATIC);
   4.236      
   4.237 -    int result = Sqlite3_step(session->set_pEp_version);
   4.238 +    int result = sqlite3_step(session->set_pEp_version);
   4.239      sqlite3_reset(session->set_pEp_version);
   4.240          
   4.241      if (result != SQLITE_DONE)
   4.242 @@ -3382,7 +3384,7 @@
   4.243      sqlite3_bind_text(session->upgrade_pEp_version_by_user_id, 3, ident->user_id, -1,
   4.244              SQLITE_STATIC);
   4.245      
   4.246 -    int result = Sqlite3_step(session->upgrade_pEp_version_by_user_id);
   4.247 +    int result = sqlite3_step(session->upgrade_pEp_version_by_user_id);
   4.248      sqlite3_reset(session->upgrade_pEp_version_by_user_id);
   4.249          
   4.250      if (result != SQLITE_DONE)
   4.251 @@ -3415,7 +3417,7 @@
   4.252          sqlite3_reset(session->exists_person);
   4.253          sqlite3_bind_text(session->exists_person, 1, user_id, -1,
   4.254                  SQLITE_STATIC);
   4.255 -        int result = Sqlite3_step(session->exists_person);
   4.256 +        int result = sqlite3_step(session->exists_person);
   4.257          switch (result) {
   4.258              case SQLITE_ROW: {
   4.259                  // yeah yeah, I know, we could be lazy here, but it looks bad.
   4.260 @@ -3453,7 +3455,7 @@
   4.261      sqlite3_bind_text(session->delete_person, 1, user_id, -1,
   4.262                        SQLITE_STATIC);
   4.263                        
   4.264 -    int result = Sqlite3_step(session->delete_person);
   4.265 +    int result = sqlite3_step(session->delete_person);
   4.266      
   4.267      if (result != SQLITE_DONE)
   4.268          status = PEP_UNKNOWN_ERROR;
   4.269 @@ -3488,7 +3490,7 @@
   4.270      sqlite3_reset(session->is_pEp_user);
   4.271      sqlite3_bind_text(session->is_pEp_user, 1, user_id, -1,
   4.272              SQLITE_STATIC);
   4.273 -    int result = Sqlite3_step(session->is_pEp_user);
   4.274 +    int result = sqlite3_step(session->is_pEp_user);
   4.275      switch (result) {
   4.276          case SQLITE_ROW: {
   4.277              // yeah yeah, I know, we could be lazy here, but it looks bad.
   4.278 @@ -3524,7 +3526,7 @@
   4.279      sqlite3_reset(session->is_own_address);
   4.280      sqlite3_bind_text(session->is_own_address, 1, address, -1,
   4.281              SQLITE_STATIC);
   4.282 -    int result = Sqlite3_step(session->is_own_address);
   4.283 +    int result = sqlite3_step(session->is_own_address);
   4.284      switch (result) {
   4.285          case SQLITE_ROW: {
   4.286              // yeah yeah, I know, we could be lazy here, but it looks bad.
   4.287 @@ -3556,7 +3558,7 @@
   4.288      sqlite3_bind_text(session->add_into_social_graph, 3, contact_ident->user_id, -1,
   4.289              SQLITE_STATIC);
   4.290          
   4.291 -    int result = Sqlite3_step(session->add_into_social_graph);
   4.292 +    int result = sqlite3_step(session->add_into_social_graph);
   4.293      sqlite3_reset(session->add_into_social_graph);
   4.294      
   4.295      if (result != SQLITE_DONE)
   4.296 @@ -3585,7 +3587,7 @@
   4.297      sqlite3_bind_text(session->get_own_address_binding_from_contact, 2, contact->user_id, -1,
   4.298              SQLITE_STATIC);
   4.299  
   4.300 -    int result = Sqlite3_step(session->get_own_address_binding_from_contact);
   4.301 +    int result = sqlite3_step(session->get_own_address_binding_from_contact);
   4.302      
   4.303      const char* own_address = NULL;
   4.304      
   4.305 @@ -3621,7 +3623,7 @@
   4.306      sqlite3_bind_text(session->remove_fpr_as_default, 1, fpr, -1,
   4.307                        SQLITE_STATIC);
   4.308  
   4.309 -    int result = Sqlite3_step(session->remove_fpr_as_default);
   4.310 +    int result = sqlite3_step(session->remove_fpr_as_default);
   4.311      sqlite3_reset(session->remove_fpr_as_default);
   4.312      
   4.313      if (result != SQLITE_DONE)
   4.314 @@ -3647,7 +3649,7 @@
   4.315      sqlite3_bind_text(session->replace_identities_fpr, 2, old_fpr, -1,
   4.316                        SQLITE_STATIC);
   4.317  
   4.318 -    int result = Sqlite3_step(session->replace_identities_fpr);
   4.319 +    int result = sqlite3_step(session->replace_identities_fpr);
   4.320      sqlite3_reset(session->replace_identities_fpr);
   4.321      
   4.322      if (result != SQLITE_DONE)
   4.323 @@ -3667,7 +3669,7 @@
   4.324      sqlite3_bind_int(session->update_trust_for_fpr, 1, comm_type);
   4.325      sqlite3_bind_text(session->update_trust_for_fpr, 2, fpr, -1,
   4.326              SQLITE_STATIC);
   4.327 -    int result = Sqlite3_step(session->update_trust_for_fpr);
   4.328 +    int result = sqlite3_step(session->update_trust_for_fpr);
   4.329      sqlite3_reset(session->update_trust_for_fpr);
   4.330      if (result != SQLITE_DONE) {
   4.331          return PEP_CANNOT_SET_TRUST;
   4.332 @@ -3699,7 +3701,7 @@
   4.333      sqlite3_bind_text(session->set_identity_flags, 3, identity->user_id, -1,
   4.334          SQLITE_STATIC);
   4.335          
   4.336 -    result = Sqlite3_step(session->set_identity_flags);
   4.337 +    result = sqlite3_step(session->set_identity_flags);
   4.338  
   4.339      sqlite3_reset(session->set_identity_flags);
   4.340      if (result != SQLITE_DONE)
   4.341 @@ -3731,7 +3733,7 @@
   4.342              SQLITE_STATIC);
   4.343      sqlite3_bind_text(session->unset_identity_flags, 3, identity->user_id, -1,
   4.344              SQLITE_STATIC);
   4.345 -    result = Sqlite3_step(session->unset_identity_flags);
   4.346 +    result = sqlite3_step(session->unset_identity_flags);
   4.347      sqlite3_reset(session->unset_identity_flags);
   4.348      if (result != SQLITE_DONE)
   4.349          return PEP_CANNOT_SET_IDENTITY;
   4.350 @@ -3755,7 +3757,7 @@
   4.351      sqlite3_reset(session->get_trust_by_userid);
   4.352      sqlite3_bind_text(session->get_trust_by_userid, 1, user_id, -1, SQLITE_STATIC);
   4.353  
   4.354 -    while ((result = Sqlite3_step(session->get_trust_by_userid)) == SQLITE_ROW) {
   4.355 +    while ((result = sqlite3_step(session->get_trust_by_userid)) == SQLITE_ROW) {
   4.356          if (!t_list)
   4.357              t_list = new_labeled_int_list(sqlite3_column_int(session->get_trust_by_userid, 1),
   4.358                                           (const char *) sqlite3_column_text(session->get_trust_by_userid, 0));
   4.359 @@ -4086,7 +4088,7 @@
   4.360              SQLITE_STATIC);
   4.361      sqlite3_bind_text(session->replace_userid, 2, old_uid, -1,
   4.362              SQLITE_STATIC);
   4.363 -    result = Sqlite3_step(session->replace_userid);
   4.364 +    result = sqlite3_step(session->replace_userid);
   4.365  #ifndef NDEBUG
   4.366      if (result) {
   4.367          const char *errmsg = sqlite3_errmsg(session->db);
   4.368 @@ -4112,7 +4114,7 @@
   4.369      sqlite3_reset(session->delete_key);
   4.370      sqlite3_bind_text(session->delete_key, 1, fpr, -1,
   4.371              SQLITE_STATIC);
   4.372 -    result = Sqlite3_step(session->delete_key);
   4.373 +    result = sqlite3_step(session->delete_key);
   4.374      sqlite3_reset(session->delete_key);
   4.375      if (result != SQLITE_DONE)
   4.376          return PEP_CANNOT_SET_PGP_KEYPAIR;
   4.377 @@ -4133,7 +4135,7 @@
   4.378      sqlite3_reset(session->refresh_userid_default_key);
   4.379      sqlite3_bind_text(session->refresh_userid_default_key, 1, user_id, -1,
   4.380              SQLITE_STATIC);
   4.381 -    result = Sqlite3_step(session->refresh_userid_default_key);
   4.382 +    result = sqlite3_step(session->refresh_userid_default_key);
   4.383      sqlite3_reset(session->refresh_userid_default_key);
   4.384      if (result != SQLITE_DONE)
   4.385          return PEP_CANNOT_SET_PERSON;
   4.386 @@ -4157,7 +4159,7 @@
   4.387              SQLITE_STATIC);
   4.388      sqlite3_bind_text(session->replace_main_user_fpr, 2, user_id, -1,
   4.389              SQLITE_STATIC);
   4.390 -    result = Sqlite3_step(session->replace_main_user_fpr);
   4.391 +    result = sqlite3_step(session->replace_main_user_fpr);
   4.392      sqlite3_reset(session->replace_main_user_fpr);
   4.393      if (result != SQLITE_DONE)
   4.394          return PEP_CANNOT_SET_PERSON;
   4.395 @@ -4184,7 +4186,7 @@
   4.396      sqlite3_reset(session->get_main_user_fpr);
   4.397      sqlite3_bind_text(session->get_main_user_fpr, 1, user_id, -1,
   4.398                        SQLITE_STATIC);
   4.399 -    result = Sqlite3_step(session->get_main_user_fpr);
   4.400 +    result = sqlite3_step(session->get_main_user_fpr);
   4.401      switch (result) {
   4.402      case SQLITE_ROW: {
   4.403          const char* _fpr = 
   4.404 @@ -4232,7 +4234,7 @@
   4.405      sqlite3_reset(session->mark_compromised);
   4.406      sqlite3_bind_text(session->mark_compromised, 1, fpr, -1,
   4.407              SQLITE_STATIC);
   4.408 -    result = Sqlite3_step(session->mark_compromised);
   4.409 +    result = sqlite3_step(session->mark_compromised);
   4.410      sqlite3_reset(session->mark_compromised);
   4.411  
   4.412      if (result != SQLITE_DONE)
   4.413 @@ -4272,7 +4274,7 @@
   4.414              SQLITE_STATIC);
   4.415      sqlite3_bind_text(session->get_trust, 2, identity->fpr, -1, SQLITE_STATIC);
   4.416  
   4.417 -    result = Sqlite3_step(session->get_trust);
   4.418 +    result = sqlite3_step(session->get_trust);
   4.419      switch (result) {
   4.420      case SQLITE_ROW: {
   4.421          int comm_type = (PEP_comm_type) sqlite3_column_int(session->get_trust,
   4.422 @@ -4311,7 +4313,7 @@
   4.423      sqlite3_reset(session->least_trust);
   4.424      sqlite3_bind_text(session->least_trust, 1, fpr, -1, SQLITE_STATIC);
   4.425  
   4.426 -    result = Sqlite3_step(session->least_trust);
   4.427 +    result = sqlite3_step(session->least_trust);
   4.428      switch (result) {
   4.429          case SQLITE_ROW: {
   4.430              int _comm_type = sqlite3_column_int(session->least_trust, 0);
   4.431 @@ -4766,7 +4768,7 @@
   4.432      int result;
   4.433  
   4.434      do {
   4.435 -        result = Sqlite3_step(session->crashdump);
   4.436 +        result = sqlite3_step(session->crashdump);
   4.437          switch (result) {
   4.438          case SQLITE_ROW:
   4.439              timestamp = (const char *) sqlite3_column_text(session->crashdump,
   4.440 @@ -4858,7 +4860,7 @@
   4.441      int result;
   4.442  
   4.443      do {
   4.444 -        result = Sqlite3_step(session->languagelist);
   4.445 +        result = sqlite3_step(session->languagelist);
   4.446          switch (result) {
   4.447          case SQLITE_ROW:
   4.448              lang = (const char *) sqlite3_column_text(session->languagelist,
   4.449 @@ -4926,7 +4928,7 @@
   4.450      const char *_phrase = NULL;
   4.451      int result;
   4.452  
   4.453 -    result = Sqlite3_step(session->i18n_token);
   4.454 +    result = sqlite3_step(session->i18n_token);
   4.455      switch (result) {
   4.456      case SQLITE_ROW:
   4.457          _phrase = (const char *) sqlite3_column_text(session->i18n_token, 0);
   4.458 @@ -4968,7 +4970,7 @@
   4.459      sqlite3_reset(session->sequence_value2);
   4.460      sqlite3_bind_text(session->sequence_value2, 1, name, -1,
   4.461              SQLITE_STATIC);
   4.462 -    int result = Sqlite3_step(session->sequence_value2);
   4.463 +    int result = sqlite3_step(session->sequence_value2);
   4.464      switch (result) {
   4.465          case SQLITE_ROW: {
   4.466              int32_t _value = (int32_t)
   4.467 @@ -4996,7 +4998,7 @@
   4.468  
   4.469      sqlite3_reset(session->sequence_value1);
   4.470      sqlite3_bind_text(session->sequence_value1, 1, name, -1, SQLITE_STATIC);
   4.471 -    int result = Sqlite3_step(session->sequence_value1);
   4.472 +    int result = sqlite3_step(session->sequence_value1);
   4.473      assert(result == SQLITE_DONE);
   4.474      sqlite3_reset(session->sequence_value1);
   4.475      if (result == SQLITE_DONE)
   4.476 @@ -5057,7 +5059,7 @@
   4.477      
   4.478      sqlite3_bind_text(session->own_key_is_listed, 1, fpr, -1,
   4.479              SQLITE_STATIC);
   4.480 -    int result = Sqlite3_step(session->own_key_is_listed);
   4.481 +    int result = sqlite3_step(session->own_key_is_listed);
   4.482      switch (result) {
   4.483          case SQLITE_ROW: {
   4.484              *own_key = (sqlite3_column_int(session->own_key_is_listed, 0) != 0);
   4.485 @@ -5101,7 +5103,7 @@
   4.486  
   4.487      int result;
   4.488      
   4.489 -    result = Sqlite3_step(session->set_revoked);
   4.490 +    result = sqlite3_step(session->set_revoked);
   4.491      switch (result) {
   4.492          case SQLITE_DONE:
   4.493              status = PEP_STATUS_OK;
   4.494 @@ -5143,7 +5145,7 @@
   4.495  
   4.496      int result;
   4.497      
   4.498 -    result = Sqlite3_step(session->get_revoked);
   4.499 +    result = sqlite3_step(session->get_revoked);
   4.500      switch (result) {
   4.501          case SQLITE_ROW: {
   4.502              *revoked_fpr = strdup((const char *)
   4.503 @@ -5187,7 +5189,7 @@
   4.504  
   4.505      int result;
   4.506      
   4.507 -    result = Sqlite3_step(session->get_replacement_fpr);
   4.508 +    result = sqlite3_step(session->get_replacement_fpr);
   4.509      switch (result) {
   4.510          case SQLITE_ROW: {
   4.511              *revoked_fpr = strdup((const char *)
   4.512 @@ -5226,7 +5228,7 @@
   4.513      sqlite3_reset(session->get_last_contacted);
   4.514      int result;
   4.515  
   4.516 -    while ((result = Sqlite3_step(session->get_last_contacted)) == SQLITE_ROW) {
   4.517 +    while ((result = sqlite3_step(session->get_last_contacted)) == SQLITE_ROW) {
   4.518          pEp_identity *ident = new_identity(
   4.519                  (const char *) sqlite3_column_text(session->get_last_contacted, 1),
   4.520                  NULL,
   4.521 @@ -5380,4 +5382,3 @@
   4.522      session->debug_color = ansi_color;
   4.523  #endif
   4.524  }
   4.525 -
     5.1 --- a/src/pgp_sequoia.c	Fri Oct 25 15:16:54 2019 +0200
     5.2 +++ b/src/pgp_sequoia.c	Mon Oct 28 15:58:27 2019 +0100
     5.3 @@ -508,7 +508,7 @@
     5.4                             pgp_tpk_t *tpkp, int *secretp)
     5.5  {
     5.6      PEP_STATUS status = PEP_STATUS_OK;
     5.7 -    int sqlite_result = Sqlite3_step(stmt);
     5.8 +    int sqlite_result = sqlite3_step(stmt);
     5.9      switch (sqlite_result) {
    5.10      case SQLITE_ROW:
    5.11          if (tpkp) {
    5.12 @@ -754,7 +754,7 @@
    5.13      char *name = NULL;
    5.14  
    5.15      sqlite3_stmt *stmt = session->sq_sql.begin_transaction;
    5.16 -    int sqlite_result = Sqlite3_step(stmt);
    5.17 +    int sqlite_result = sqlite3_step(stmt);
    5.18      sqlite3_reset(stmt);
    5.19      if (sqlite_result != SQLITE_DONE)
    5.20          ERROR_OUT(NULL, PEP_UNKNOWN_ERROR,
    5.21 @@ -800,7 +800,7 @@
    5.22      sqlite3_bind_int(stmt, 2, is_tsk);
    5.23      sqlite3_bind_blob(stmt, 3, tsk_buffer, tsk_buffer_len, SQLITE_STATIC);
    5.24  
    5.25 -    sqlite_result = Sqlite3_step(stmt);
    5.26 +    sqlite_result = sqlite3_step(stmt);
    5.27      sqlite3_reset(stmt);
    5.28      if (sqlite_result != SQLITE_DONE)
    5.29          ERROR_OUT(NULL, PEP_UNKNOWN_ERROR,
    5.30 @@ -818,7 +818,7 @@
    5.31          sqlite3_bind_text(stmt, 1, keyid_hex, -1, SQLITE_STATIC);
    5.32          sqlite3_bind_text(stmt, 2, fpr, -1, SQLITE_STATIC);
    5.33  
    5.34 -        sqlite_result = Sqlite3_step(stmt);
    5.35 +        sqlite_result = sqlite3_step(stmt);
    5.36          sqlite3_reset(stmt);
    5.37          free(keyid_hex);
    5.38          pgp_keyid_free(keyid);
    5.39 @@ -865,7 +865,7 @@
    5.40              sqlite3_bind_text(stmt, 1, email, -1, SQLITE_STATIC);
    5.41              sqlite3_bind_text(stmt, 2, fpr, -1, SQLITE_STATIC);
    5.42  
    5.43 -            sqlite_result = Sqlite3_step(stmt);
    5.44 +            sqlite_result = sqlite3_step(stmt);
    5.45              sqlite3_reset(stmt);
    5.46  
    5.47              if (sqlite_result != SQLITE_DONE) {
    5.48 @@ -899,7 +899,7 @@
    5.49          stmt = status == PEP_STATUS_OK
    5.50              ? session->sq_sql.commit_transaction
    5.51              : session->sq_sql.rollback_transaction;
    5.52 -        int sqlite_result = Sqlite3_step(stmt);
    5.53 +        int sqlite_result = sqlite3_step(stmt);
    5.54          sqlite3_reset(stmt);
    5.55          if (sqlite_result != SQLITE_DONE)
    5.56              ERROR_OUT(NULL, PEP_UNKNOWN_ERROR,
    5.57 @@ -1923,7 +1923,7 @@
    5.58      sqlite3_stmt *stmt = session->sq_sql.delete_keypair;
    5.59      sqlite3_bind_text(stmt, 1, fpr, -1, free);
    5.60  
    5.61 -    int sqlite_result = Sqlite3_step(stmt);
    5.62 +    int sqlite_result = sqlite3_step(stmt);
    5.63      sqlite3_reset(stmt);
    5.64      if (sqlite_result != SQLITE_DONE)
    5.65          ERROR_OUT(NULL, PEP_CANNOT_DELETE_KEY,
     6.1 --- a/src/sqlite3.c	Fri Oct 25 15:16:54 2019 +0200
     6.2 +++ b/src/sqlite3.c	Mon Oct 28 15:58:27 2019 +0100
     6.3 @@ -116736,7 +116736,7 @@
     6.4  **                                cause sqlite3_step() to return immediately
     6.5  **                                with SQLITE_CONSTRAINT.
     6.6  **
     6.7 -**  any              FAIL         Sqlite3_step() returns immediately with a
     6.8 +**  any              FAIL         sqlite3_step() returns immediately with a
     6.9  **                                return code of SQLITE_CONSTRAINT.  The
    6.10  **                                transaction is not rolled back and any
    6.11  **                                changes to prior rows are retained.
     7.1 --- a/sync/sql_func.yml2	Fri Oct 25 15:16:54 2019 +0200
     7.2 +++ b/sync/sql_func.yml2	Mon Oct 28 15:58:27 2019 +0100
     7.3 @@ -31,7 +31,7 @@
     7.4      call "init_sql" with "sql", "$sql";
     7.5      ||
     7.6          int _result = 0;
     7.7 -        int_result = Sqlite3_step(_sql);
     7.8 +        int_result = sqlite3_step(_sql);
     7.9          assert(int_result == SQLITE_ROW);
    7.10          if (int_result == SQLITE_ROW)
    7.11              _result = sqlite3_column_int(_sql, 0);