merge spinlock_remove
authorKrista 'DarthMama' Bennett <krista@pep.foundation>
Fri, 25 Oct 2019 16:50:23 +0200
branchspinlock_remove
changeset 4143516f9d4e7072
parent 4142 3053a46b8b56
parent 4141 efcda28ffd7e
child 4144 f49072f9ffb4
merge
     1.1 --- a/sync/cond_act_sync.yml2	Fri Oct 25 16:49:43 2019 +0200
     1.2 +++ b/sync/cond_act_sync.yml2	Fri Oct 25 16:50:23 2019 +0200
     1.3 @@ -492,8 +492,8 @@
     1.4  
     1.5  action storeThisKey
     1.6  ||
     1.7 -    assert(session->sync_state.keysync.key.buf && session->sync_state.keysync.key.size);
     1.8 -    if (!(session->sync_state.keysync.key.buf && session->sync_state.keysync.key.size))
     1.9 +    assert(session->sync_state.keysync.key.size);
    1.10 +    if (!session->sync_state.keysync.key.size)
    1.11          return PEP_ILLEGAL_VALUE;
    1.12  
    1.13      char *fpr = strndup(session->sync_state.keysync.key.buf, session->sync_state.keysync.key.size);
     2.1 --- a/sync/gen_statemachine.ysl2	Fri Oct 25 16:49:43 2019 +0200
     2.2 +++ b/sync/gen_statemachine.ysl2	Fri Oct 25 16:50:23 2019 +0200
     2.3 @@ -1121,6 +1121,7 @@
     2.4          }
     2.5          ||
     2.6                  default:
     2.7 +                    assert(0);
     2.8                      return "unknown state";
     2.9              }
    2.10          }
    2.11 @@ -1142,6 +1143,7 @@
    2.12          }
    2.13          ||
    2.14                  default:
    2.15 +                    assert(0);
    2.16                      return "unknown event";
    2.17              }
    2.18          }
    2.19 @@ -1194,6 +1196,7 @@
    2.20                  `` apply "state", 2, mode=fsm
    2.21                  default:
    2.22                      «@name»_ERR_LOG("invalid state", «@name»_state_name(state));
    2.23 +                    assert(0);
    2.24                      return invalid_state;
    2.25              }
    2.26              
    2.27 @@ -1292,6 +1295,7 @@
    2.28              return out_of_memory;
    2.29          if (status) {
    2.30              «$fsm/@name»_ERR_LOG_HEX("executing action «@name»() failed", status);
    2.31 +            assert(0);
    2.32              return invalid_action;
    2.33          }
    2.34          ||
    2.35 @@ -1306,6 +1310,7 @@
    2.36              return out_of_memory;
    2.37          if (status) {
    2.38              «$fsm/@name»_ERR_LOG_HEX("computing condition «@name» failed", status);
    2.39 +            assert(0);
    2.40              return invalid_condition;
    2.41          }
    2.42          if (result) {
     3.1 --- a/sync/sync.fsm	Fri Oct 25 16:49:43 2019 +0200
     3.2 +++ b/sync/sync.fsm	Fri Oct 25 16:50:23 2019 +0200
     3.3 @@ -307,13 +307,13 @@
     3.4                  send GroupHandshake;
     3.5                  go HandshakingGrouped;
     3.6              }
     3.7 -/*
     3.8 +
     3.9              on GroupHandshake {
    3.10 +                do storeNegotiation;
    3.11                  do storeThisKey;
    3.12 -                do storeNegotiation;
    3.13                  go HandshakingGrouped;
    3.14              }
    3.15 -*/
    3.16 +
    3.17              on GroupTrustThisKey
    3.18                  do trustThisKey;
    3.19          }