more careful sync
authorVolker Birk <vb@pep-project.org>
Fri, 22 Mar 2019 16:05:04 +0100
branchsync
changeset 33792f957d83c0f7
parent 3377 922fd505e0c0
child 3380 aad0fe0a6387
more careful
sync/cond_act_sync.yml2
sync/gen_statemachine.ysl2
sync/sync.fsm
     1.1 --- a/sync/cond_act_sync.yml2	Fri Mar 22 12:51:51 2019 +0100
     1.2 +++ b/sync/cond_act_sync.yml2	Fri Mar 22 16:05:04 2019 +0100
     1.3 @@ -136,12 +136,15 @@
     1.4              return PEP_OUT_OF_MEMORY;
     1.5          }
     1.6  
     1.7 -        free(partner->fpr);
     1.8 -        partner->fpr = strdup(session->sync_state.common.signature_fpr);
     1.9 -        if (!partner->fpr) {
    1.10 -            free_identity(me);
    1.11 -            free_identity(partner);
    1.12 -            return PEP_OUT_OF_MEMORY;
    1.13 +        assert(session->sync_state.common.signature_fpr);
    1.14 +        if (session->sync_state.common.signature_fpr) {
    1.15 +            free(partner->fpr);
    1.16 +            partner->fpr = strdup(session->sync_state.common.signature_fpr);
    1.17 +            if (!partner->fpr) {
    1.18 +                free_identity(me);
    1.19 +                free_identity(partner);
    1.20 +                return PEP_OUT_OF_MEMORY;
    1.21 +            }
    1.22          }
    1.23  
    1.24          status = session->notifyHandshake(me, partner, «$type»);
     2.1 --- a/sync/gen_statemachine.ysl2	Fri Mar 22 12:51:51 2019 +0100
     2.2 +++ b/sync/gen_statemachine.ysl2	Fri Mar 22 16:05:04 2019 +0100
     2.3 @@ -922,7 +922,7 @@
     2.4          if "not(event[@name='Init'])"
     2.5          ||
     2.6                  case Init:
     2.7 -                    // nothing to do
     2.8 +                    «../@name»_SERVICE_LOG("received Init but nothing to do", "Init");
     2.9                      break;
    2.10  
    2.11          ||
     3.1 --- a/sync/sync.fsm	Fri Mar 22 12:51:51 2019 +0100
     3.2 +++ b/sync/sync.fsm	Fri Mar 22 16:05:04 2019 +0100
     3.3 @@ -318,6 +318,7 @@
     3.4          }
     3.5  
     3.6          message HandshakeAnswer 4 {
     3.7 +            auto Version version;
     3.8              field TID transaction;
     3.9          }
    3.10