src/sync_driver.c
branchkeysync
changeset 964 ef02296c41ca
parent 951 dec407deb10e
child 1043 f786ee22e281
     1.1 --- a/src/sync_driver.c	Mon Aug 01 12:32:04 2016 +0200
     1.2 +++ b/src/sync_driver.c	Tue Aug 02 12:06:45 2016 +0200
     1.3 @@ -15,9 +15,14 @@
     1.4      if (!session)
     1.5          return PEP_ILLEGAL_VALUE;
     1.6  
     1.7 -    session->sync_state = fsm_DeviceState(session, session->sync_state,
     1.8 -            event, partner, extra);
     1.9 +    DeviceState_state state = fsm_DeviceState(session,
    1.10 +            session->sync_state, event, partner, extra);
    1.11 +    if (state == invalid_out_of_memory)
    1.12 +        return PEP_OUT_OF_MEMORY;
    1.13 +    if (state < 0)
    1.14 +        return PEP_SYNC_STATEMACHINE_ERROR - state;
    1.15  
    1.16 +    session->sync_state = state;
    1.17      return PEP_STATUS_OK;
    1.18  }
    1.19