Browse Source

ENGINE-114: applying dean's project file move patch

ENGINE-109
Krista Grothoff 6 years ago
parent
commit
f7d8a8a7f5
3 changed files with 132 additions and 157 deletions
  1. +67
    -67
      build-windows/pEpEngine.vcxproj
  2. +62
    -62
      build-windows/pEpEngine.vcxproj.filters
  3. +3
    -28
      src/sync_fsm.c

pEpEngine.vcxproj → build-windows/pEpEngine.vcxproj View File


pEpEngine.vcxproj.filters → build-windows/pEpEngine.vcxproj.filters View File


+ 3
- 28
src/sync_fsm.c View File

@ -1,5 +1,4 @@
#include "sync_fsm.h"
#include <stdio.h>
// state machine for DeviceState
@ -16,10 +15,8 @@ DeviceState_state fsm_DeviceState(
switch (state) {
case InitState:
printf("State : InitState\n");
switch (event) {
case Init:
printf("Event : Init\n");
cond_result = storedGroupKeys(session);
if (cond_result < 0)
return cond_result;
@ -33,11 +30,9 @@ DeviceState_state fsm_DeviceState(
break;
case Sole:
printf("State : Sole\n");
switch (event) {
case Init: printf("Event : Init\n"); break;
case Init: break;
case KeyGen:
printf("Event : KeyGen\n");
status = sendBeacon(session, state, NULL, NULL);
if (status == PEP_OUT_OF_MEMORY)
return (int) invalid_out_of_memory;
@ -45,7 +40,6 @@ DeviceState_state fsm_DeviceState(
return (int) invalid_action;
break;
case CannotDecrypt:
printf("Event : CannotDecrypt\n");
status = sendBeacon(session, state, NULL, NULL);
if (status == PEP_OUT_OF_MEMORY)
return (int) invalid_out_of_memory;
@ -53,7 +47,6 @@ DeviceState_state fsm_DeviceState(
return (int) invalid_action;
break;
case Beacon:
printf("Event : Beacon\n");
status = sendHandshakeRequest(session, state, partner, NULL);
if (status == PEP_OUT_OF_MEMORY)
return (int) invalid_out_of_memory;
@ -61,7 +54,6 @@ DeviceState_state fsm_DeviceState(
return (int) invalid_action;
break;
case HandshakeRequest:
printf("Event : HandshakeRequest\n");
status = sendHandshakeRequest(session, state, partner, NULL);
if (status == PEP_OUT_OF_MEMORY)
return (int) invalid_out_of_memory;
@ -74,10 +66,8 @@ DeviceState_state fsm_DeviceState(
break;
case HandshakingSole:
printf("State : HandshakingSole\n");
switch (event) {
case Init:
printf("Event : Init\n");
status = showHandshake(session, state, partner, NULL);
if (status == PEP_OUT_OF_MEMORY)
return (int) invalid_out_of_memory;
@ -85,7 +75,6 @@ DeviceState_state fsm_DeviceState(
return (int) invalid_action;
break;
case HandshakeRejected:
printf("Event : HandshakeRejected\n");
status = rejectHandshake(session, state, partner, NULL);
if (status == PEP_OUT_OF_MEMORY)
return (int) invalid_out_of_memory;
@ -93,7 +82,6 @@ DeviceState_state fsm_DeviceState(
return (int) invalid_action;
return Sole;
case HandshakeAccepted:
printf("Event : HandshakeAccepted\n");
status = acceptHandshake(session, state, partner, NULL);
if (status == PEP_OUT_OF_MEMORY)
return (int) invalid_out_of_memory;
@ -117,11 +105,9 @@ DeviceState_state fsm_DeviceState(
break;
case WaitForGroupKeysSole:
printf("State : WaitForGroupKeysSole\n");
switch (event) {
case Init: printf("Event : Init\n"); break;
case Init: break;
case GroupKeys:
printf("Event : GroupKeys\n");
status = storeGroupKeys(session, state, partner, extra /*keys*/);
if (status == PEP_OUT_OF_MEMORY)
return (int) invalid_out_of_memory;
@ -129,10 +115,8 @@ DeviceState_state fsm_DeviceState(
return (int) invalid_action;
return Grouped;
case Cancel:
printf("Event : Cancel\n");
return Sole;
case Reject:
printf("Event : Reject\n");
status = rejectHandshake(session, state, partner, NULL);
if (status == PEP_OUT_OF_MEMORY)
return (int) invalid_out_of_memory;
@ -145,11 +129,9 @@ DeviceState_state fsm_DeviceState(
break;
case Grouped:
printf("State : Grouped\n");
switch (event) {
case Init: printf("Event : Init\n"); break;
case Init: break;
case KeyGen:
printf("Event : KeyGen\n");
status = sendGroupKeys(session, state, NULL, NULL);
if (status == PEP_OUT_OF_MEMORY)
return (int) invalid_out_of_memory;
@ -157,7 +139,6 @@ DeviceState_state fsm_DeviceState(
return (int) invalid_action;
break;
case Beacon:
printf("Event : Beacon\n");
status = sendHandshakeRequest(session, state, partner, NULL);
if (status == PEP_OUT_OF_MEMORY)
return (int) invalid_out_of_memory;
@ -165,7 +146,6 @@ DeviceState_state fsm_DeviceState(
return (int) invalid_action;
break;
case HandshakeRequest:
printf("Event : HandshakeRequest\n");
status = sendHandshakeRequest(session, state, partner, NULL);
if (status == PEP_OUT_OF_MEMORY)
return (int) invalid_out_of_memory;
@ -173,7 +153,6 @@ DeviceState_state fsm_DeviceState(
return (int) invalid_action;
return HandshakingGrouped;
case GroupKeys:
printf("Event : GroupKeys\n");
status = storeGroupKeys(session, state, partner, extra /*keys*/);
if (status == PEP_OUT_OF_MEMORY)
return (int) invalid_out_of_memory;
@ -186,10 +165,8 @@ DeviceState_state fsm_DeviceState(
break;
case HandshakingGrouped:
printf("State : HandshakingGrouped\n");
switch (event) {
case Init:
printf("Event : Init\n");
status = showHandshake(session, state, partner, NULL);
if (status == PEP_OUT_OF_MEMORY)
return (int) invalid_out_of_memory;
@ -197,7 +174,6 @@ DeviceState_state fsm_DeviceState(
return (int) invalid_action;
break;
case HandshakeRejected:
printf("Event : HandshakeRejected\n");
status = rejectHandshake(session, state, partner, NULL);
if (status == PEP_OUT_OF_MEMORY)
return (int) invalid_out_of_memory;
@ -205,7 +181,6 @@ DeviceState_state fsm_DeviceState(
return (int) invalid_action;
return Grouped;
case HandshakeAccepted:
printf("Event : HandshakeAccepted\n");
status = acceptHandshake(session, state, partner, NULL);
if (status == PEP_OUT_OF_MEMORY)
return (int) invalid_out_of_memory;


Loading…
Cancel
Save