commenting unused functions and checking in some code sync
authorVolker Birk <vb@pep-project.org>
Tue, 19 Mar 2019 10:02:55 +0100
branchsync
changeset 3345dc801621cafa
parent 3344 1f1e81725e53
child 3347 1572cabb0cc4
commenting unused functions and checking in some code
src/keymanagement.c
src/message_api.c
sync/sync.fsm
     1.1 --- a/src/keymanagement.c	Mon Mar 18 15:58:53 2019 +0100
     1.2 +++ b/src/keymanagement.c	Tue Mar 19 10:02:55 2019 +0100
     1.3 @@ -1495,7 +1495,6 @@
     1.4          }
     1.5      }    
     1.6  
     1.7 -pEp_free:
     1.8      free(ident_default_fpr);
     1.9      free(cached_fpr);
    1.10      free_identity(tmp_id);
     2.1 --- a/src/message_api.c	Mon Mar 18 15:58:53 2019 +0100
     2.2 +++ b/src/message_api.c	Tue Mar 19 10:02:55 2019 +0100
     2.3 @@ -1366,15 +1366,15 @@
     2.4      return comm_type;
     2.5  }
     2.6  
     2.7 -static void free_bl_entry(bloblist_t *bl)
     2.8 -{
     2.9 -    if (bl) {
    2.10 -        free(bl->value);
    2.11 -        free(bl->mime_type);
    2.12 -        free(bl->filename);
    2.13 -        free(bl);
    2.14 -    }
    2.15 -}
    2.16 +// static void free_bl_entry(bloblist_t *bl)
    2.17 +// {
    2.18 +//     if (bl) {
    2.19 +//         free(bl->value);
    2.20 +//         free(bl->mime_type);
    2.21 +//         free(bl->filename);
    2.22 +//         free(bl);
    2.23 +//     }
    2.24 +// }
    2.25  
    2.26  static bool is_key(const bloblist_t *bl)
    2.27  {
    2.28 @@ -1395,29 +1395,29 @@
    2.29             );
    2.30  }
    2.31  
    2.32 -static void remove_attached_keys(message *msg)
    2.33 -{
    2.34 -    if (msg) {
    2.35 -        bloblist_t *last = NULL;
    2.36 -        for (bloblist_t *bl = msg->attachments; bl && bl->value; ) {
    2.37 -            bloblist_t *next = bl->next;
    2.38 -
    2.39 -            if (is_key(bl)) {
    2.40 -                if (last) {
    2.41 -                    last->next = next;
    2.42 -                }
    2.43 -                else {
    2.44 -                    msg->attachments = next;
    2.45 -                }
    2.46 -                free_bl_entry(bl);
    2.47 -            }
    2.48 -            else {
    2.49 -                last = bl;
    2.50 -            }
    2.51 -            bl = next;
    2.52 -        }
    2.53 -    }
    2.54 -}
    2.55 +// static void remove_attached_keys(message *msg)
    2.56 +// {
    2.57 +//     if (msg) {
    2.58 +//         bloblist_t *last = NULL;
    2.59 +//         for (bloblist_t *bl = msg->attachments; bl && bl->value; ) {
    2.60 +//             bloblist_t *next = bl->next;
    2.61 +// 
    2.62 +//             if (is_key(bl)) {
    2.63 +//                 if (last) {
    2.64 +//                     last->next = next;
    2.65 +//                 }
    2.66 +//                 else {
    2.67 +//                     msg->attachments = next;
    2.68 +//                 }
    2.69 +//                 free_bl_entry(bl);
    2.70 +//             }
    2.71 +//             else {
    2.72 +//                 last = bl;
    2.73 +//             }
    2.74 +//             bl = next;
    2.75 +//         }
    2.76 +//     }
    2.77 +// }
    2.78  
    2.79  static bool compare_first_n_bytes(const char* first, const char* second, size_t n) {
    2.80      int i;
    2.81 @@ -3855,8 +3855,8 @@
    2.82          char *sync_fpr = NULL;
    2.83          PEP_STATUS tmpstatus = base_extract_message(session, msg, &size, &data, &sync_fpr);
    2.84          if (!tmpstatus && size && data) {
    2.85 -            if ((*keylist && strcasecmp(msg->from->fpr, (*keylist)->value))
    2.86 -                    || (sync_fpr && strcasecmp(msg->from->fpr, sync_fpr))) {
    2.87 +        //    if ((*keylist && strcasecmp(msg->from->fpr, (*keylist)->value))
    2.88 +        //            || (sync_fpr && strcasecmp(msg->from->fpr, sync_fpr))) {
    2.89                  pEp_identity *_from = identity_dup(msg->from);
    2.90                  if (!_from) {
    2.91                      free_message(*dst);
    2.92 @@ -3870,7 +3870,7 @@
    2.93                      free_identity(session->sync_state.common.from);
    2.94                  session->sync_state.common.from = _from;
    2.95                  signal_Sync_message(session, *rating, data, size, sync_fpr);
    2.96 -            }
    2.97 +        //    }
    2.98          }
    2.99          free(sync_fpr);
   2.100      }
     3.1 --- a/sync/sync.fsm	Mon Mar 18 15:58:53 2019 +0100
     3.2 +++ b/sync/sync.fsm	Tue Mar 19 10:02:55 2019 +0100
     3.3 @@ -53,15 +53,14 @@
     3.4                      if partnerIsGrouped
     3.5                          go HandshakingWithGroup;
     3.6  
     3.7 -                    go HandshakingNew();
     3.8 +                    go HandshakingNew;
     3.9                  }
    3.10              }
    3.11 -
    3.12          }
    3.13  
    3.14          state HandshakeRequested {
    3.15              on HandshakeAnswer
    3.16 -                go HandshakingNew();
    3.17 +                go HandshakingNew;
    3.18          }
    3.19  
    3.20          // handshaking without existing Device group