Simplify event types
This commit is contained in:
parent
1c7011400c
commit
49e44f064d
@ -12,12 +12,11 @@
|
|||||||
enum class SesameEvent {
|
enum class SesameEvent {
|
||||||
TextReceived = 1,
|
TextReceived = 1,
|
||||||
UnexpectedSocketEvent = 2,
|
UnexpectedSocketEvent = 2,
|
||||||
InvalidPayloadSize = 3,
|
InvalidMessageData = 3,
|
||||||
MessageAuthenticationFailed = 4,
|
MessageAuthenticationFailed = 4,
|
||||||
MessageTimeMismatch = 5,
|
MessageTimeMismatch = 5,
|
||||||
MessageCounterInvalid = 6,
|
MessageCounterInvalid = 6,
|
||||||
MessageAccepted = 7,
|
MessageAccepted = 7,
|
||||||
InfoMessage = 8,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -68,7 +68,7 @@ switch(type) {
|
|||||||
|
|
||||||
void ServerConnection::processReceivedBytes(uint8_t* payload, size_t length) {
|
void ServerConnection::processReceivedBytes(uint8_t* payload, size_t length) {
|
||||||
if (length != AUTHENTICATED_MESSAGE_SIZE) {
|
if (length != AUTHENTICATED_MESSAGE_SIZE) {
|
||||||
sendFailureResponse(SesameEvent::InvalidPayloadSize);
|
sendFailureResponse(SesameEvent::InvalidMessageData);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
AuthenticatedMessage* message = (AuthenticatedMessage*) payload;
|
AuthenticatedMessage* message = (AuthenticatedMessage*) payload;
|
||||||
|
Loading…
Reference in New Issue
Block a user