src/sync.c
branchkeysync
changeset 976 75cbd583a894
parent 951 dec407deb10e
child 986 8f85f70bdd75
     1.1 --- a/src/sync.c	Thu Aug 04 09:32:06 2016 +0200
     1.2 +++ b/src/sync.c	Fri Aug 05 13:22:55 2016 +0200
     1.3 @@ -17,7 +17,15 @@
     1.4      session->messageToSend = messageToSend;
     1.5      session->showHandshake = showHandshake;
     1.6  
     1.7 -    return PEP_STATUS_OK;
     1.8 +    // start state machine
     1.9 +    session->sync_state = InitState;
    1.10 +    PEP_STATUS status = fsm_DeviceState_inject(session, Init, NULL, NULL);
    1.11 +    if (status != PEP_STATUS_OK) {
    1.12 +        // stop state machine
    1.13 +        session->sync_state = DeviceState_state_NONE;
    1.14 +    }
    1.15 +
    1.16 +    return status;
    1.17  }
    1.18  
    1.19  DYNAMIC_API void unregister_sync_callbacks(PEP_SESSION session) {