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