Reverting back to sync to start afresh ENGINE-581
authorKrista 'DarthMama' Bennett <krista@pep.foundation>
Thu, 27 Jun 2019 13:12:07 +0200
branchENGINE-581
changeset 3885843f7c599a97
parent 3877 cad51de6ba9a
child 3886 ebd61a1cf6db
Reverting back to sync to start afresh
src/message_api.c
src/message_api.h
src/pEp_internal.h
src/pgp_sequoia.c
     1.1 --- a/src/message_api.c	Tue Jun 25 20:27:05 2019 +0200
     1.2 +++ b/src/message_api.c	Thu Jun 27 13:12:07 2019 +0200
     1.3 @@ -3126,6 +3126,7 @@
     1.4  }
     1.5  
     1.6  static PEP_STATUS reconcile_sent_and_recv_info(message* src, message* inner_message) {
     1.7 +    PEP_STATUS status = PEP_STATUS_OK;
     1.8      if (!src || !inner_message)
     1.9          return PEP_ILLEGAL_VALUE;
    1.10          
    1.11 @@ -4193,24 +4194,6 @@
    1.12      return PEP_color_no_color;
    1.13  }
    1.14  
    1.15 -DYNAMIC_API PEP_STATUS get_rating_from_bare_key(
    1.16 -        PEP_SESSION session, 
    1.17 -        const char* fpr,
    1.18 -        PEP_rating* rating
    1.19 -    )
    1.20 -{
    1.21 -    if (!rating || !fpr)
    1.22 -        return PEP_ILLEGAL_VALUE;
    1.23 -        
    1.24 -    PEP_comm_type comm_type = PEP_ct_unknown;
    1.25 -    *rating = PEP_rating_undefined;
    1.26 -    PEP_STATUS status = get_key_rating(session, fpr, &comm_type);
    1.27 -    if (status == PEP_STATUS_OK)
    1.28 -        *rating = _rating(comm_type);
    1.29 -    
    1.30 -    return status;    
    1.31 -}
    1.32 -
    1.33  /* [0-9]: 0x30 - 0x39; [A-F] = 0x41 - 0x46; [a-f] = 0x61 - 0x66 */
    1.34  static short asciihex_to_num(char a) {
    1.35      short conv_num = -1;
     2.1 --- a/src/message_api.h	Tue Jun 25 20:27:05 2019 +0200
     2.2 +++ b/src/message_api.h	Thu Jun 27 13:12:07 2019 +0200
     2.3 @@ -507,23 +507,6 @@
     2.4          PEP_rating *rating
     2.5      );
     2.6  
     2.7 -// get_rating_from_bare_key() - get the rating of a certain key (instead of just the comm_type)
     2.8 -//
     2.9 -//  parameters:
    2.10 -//
    2.11 -//      session (in)            session handle
    2.12 -//      fpr (in)                string with fingerprint
    2.13 -//      rating (out)            rating of key for this user
    2.14 -//
    2.15 -//  returns:
    2.16 -//      status from get_key_rating, which only returns comm_type.
    2.17 -
    2.18 -DYNAMIC_API PEP_STATUS get_rating_from_bare_key(
    2.19 -        PEP_SESSION session, 
    2.20 -        const char* fpr,
    2.21 -        PEP_rating* rating
    2.22 -    );
    2.23 -
    2.24  #ifdef __cplusplus
    2.25  }
    2.26  #endif
     3.1 --- a/src/pEp_internal.h	Tue Jun 25 20:27:05 2019 +0200
     3.2 +++ b/src/pEp_internal.h	Thu Jun 27 13:12:07 2019 +0200
     3.3 @@ -17,7 +17,7 @@
     3.4  #define PARMS_MAX 32768
     3.5  
     3.6  // maximum busy wait time in ms
     3.7 -#define BUSY_WAIT_TIME 10000
     3.8 +#define BUSY_WAIT_TIME 5000
     3.9  
    3.10  // maximum line length for reading gpg.conf
    3.11  #define MAX_LINELENGTH 1024
    3.12 @@ -131,7 +131,6 @@
    3.13      sqlite3 *key_db;
    3.14      struct {
    3.15          sqlite3_stmt *begin_transaction;
    3.16 -        sqlite3_stmt *begin_transaction_excl;
    3.17          sqlite3_stmt *commit_transaction;
    3.18          sqlite3_stmt *rollback_transaction;
    3.19          sqlite3_stmt *tpk_find;
    3.20 @@ -487,3 +486,4 @@
    3.21      } while (rc == SQLITE_BUSY || rc == SQLITE_LOCKED);
    3.22      return rc;
    3.23  }
    3.24 +
     4.1 --- a/src/pgp_sequoia.c	Tue Jun 25 20:27:05 2019 +0200
     4.2 +++ b/src/pgp_sequoia.c	Thu Jun 27 13:12:07 2019 +0200
     4.3 @@ -219,8 +219,6 @@
     4.4          ERROR_OUT(NULL, PEP_INIT_CANNOT_OPEN_DB,
     4.5                    "opening keys DB: %s", sqlite3_errmsg(session->key_db));
     4.6  
     4.7 -    sqlite3_busy_timeout(session->key_db, BUSY_WAIT_TIME);
     4.8 -
     4.9      sqlite_result = sqlite3_exec(session->key_db,
    4.10                                   "PRAGMA secure_delete=true;\n"
    4.11                                   "PRAGMA foreign_keys=true;\n"
    4.12 @@ -298,11 +296,6 @@
    4.13      assert(sqlite_result == SQLITE_OK);
    4.14  
    4.15      sqlite_result
    4.16 -        = sqlite3_prepare_v2(session->key_db, "begin transaction exclusive",
    4.17 -                             -1, &session->sq_sql.begin_transaction_excl, NULL);
    4.18 -    assert(sqlite_result == SQLITE_OK);
    4.19 -
    4.20 -    sqlite_result
    4.21          = sqlite3_prepare_v2(session->key_db, "commit transaction",
    4.22                               -1, &session->sq_sql.commit_transaction, NULL);
    4.23      assert(sqlite_result == SQLITE_OK);
    4.24 @@ -704,7 +697,7 @@
    4.25      char *email = NULL;
    4.26      char *name = NULL;
    4.27  
    4.28 -    sqlite3_stmt *stmt = session->sq_sql.begin_transaction_excl;
    4.29 +    sqlite3_stmt *stmt = session->sq_sql.begin_transaction;
    4.30      int sqlite_result = Sqlite3_step(stmt);
    4.31      sqlite3_reset(stmt);
    4.32      if (sqlite_result != SQLITE_DONE)
    4.33 @@ -859,7 +852,6 @@
    4.34                        sqlite3_errmsg(session->key_db));
    4.35      }
    4.36  
    4.37 -
    4.38      T("(%s) -> %s", fpr, pEp_status_to_string(status));
    4.39  
    4.40      free(email);