sync/devicegroup.fsm
changeset 1281 efff88dcdc59
parent 1236 991afc1aa2a1
child 1297 78f5f9894fbd
     1.1 --- a/sync/devicegroup.fsm	Fri Oct 14 16:55:06 2016 +0200
     1.2 +++ b/sync/devicegroup.fsm	Sat Oct 15 17:45:16 2016 +0200
     1.3 @@ -10,6 +10,7 @@
     1.4      // all messages have a timestamp, time out and are removed after timeout
     1.5  
     1.6      broadcast sendBeacon;
     1.7 +    broadcast sendGroupUpdate;
     1.8      unencrypted sendBeacon;
     1.9  
    1.10      fsm DeviceState filename=sync {
    1.11 @@ -59,7 +60,6 @@
    1.12          state WaitForGroupKeysSole(Identity partner) {
    1.13              on GroupKeys(Identity partner, Stringlist keys) {
    1.14                  do storeGroupKeys(partner, keys);
    1.15 -                // TODO : add a callback to signal finished waiting for group keys
    1.16                  go Grouped;
    1.17              }
    1.18              on Cancel go Sole;
    1.19 @@ -71,18 +71,15 @@
    1.20  
    1.21          state Grouped {
    1.22              on KeyGen
    1.23 -                do sendGroupKeys; // always send all keys
    1.24 +                do sendGroupUpdate;
    1.25              on Beacon(Identity partner)
    1.26                  do sendHandshakeRequest(partner);
    1.27              on HandshakeRequest(Identity partner) {
    1.28                  do sendHandshakeRequest(partner);
    1.29                  go HandshakingGrouped(partner);
    1.30              }
    1.31 -            on GroupKeys(Identity partner, Stringlist keys) {
    1.32 +            on GroupUpdate(Identity partner, Stringlist keys)
    1.33                  do storeGroupKeys(partner, keys);
    1.34 -                // TODO : add a callback to signal finished waiting for group keys
    1.35 -                go Grouped;
    1.36 -            }
    1.37          }
    1.38  
    1.39          state HandshakingGrouped(Identity partner) {