diff options
author | Diadlo <polsha3@gmail.com> | 2018-02-02 15:00:06 +0300 |
---|---|---|
committer | Diadlo <polsha3@gmail.com> | 2018-02-02 15:00:43 +0300 |
commit | 99bfb9a4f2b15d3b5a9fe3878df2eb5e55c428aa (patch) | |
tree | 2954ae5e3b327d93343a082e869e9f159f2d0c08 /toxcore/Messenger.c | |
parent | 83779a21eaf19bbf6aa5d61d8f59681a306e4f65 (diff) |
Revert "Add correction message type"
This reverts commit e16d3894c5979fcfe1c57bf7dadc455ce690baf9 and
commit c5976e37eaadf663dc3d0c18376ea023355048f3.
Diffstat (limited to 'toxcore/Messenger.c')
-rw-r--r-- | toxcore/Messenger.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index c665a1f8..73fab888 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c | |||
@@ -489,8 +489,7 @@ int m_friend_exists(const Messenger *m, int32_t friendnumber) | |||
489 | int m_send_message_generic(Messenger *m, int32_t friendnumber, uint8_t type, const uint8_t *message, uint32_t length, | 489 | int m_send_message_generic(Messenger *m, int32_t friendnumber, uint8_t type, const uint8_t *message, uint32_t length, |
490 | uint32_t *message_id) | 490 | uint32_t *message_id) |
491 | { | 491 | { |
492 | /* MESSAGE_LAST itself is incorrect value */ | 492 | if (type > MESSAGE_ACTION) { |
493 | if (type >= MESSAGE_LAST) { | ||
494 | return -5; | 493 | return -5; |
495 | } | 494 | } |
496 | 495 | ||
@@ -2216,8 +2215,7 @@ static int m_handle_packet(void *object, int i, const uint8_t *temp, uint16_t le | |||
2216 | } | 2215 | } |
2217 | 2216 | ||
2218 | case PACKET_ID_MESSAGE: // fall-through | 2217 | case PACKET_ID_MESSAGE: // fall-through |
2219 | case PACKET_ID_ACTION: | 2218 | case PACKET_ID_ACTION: { |
2220 | case PACKET_ID_CORRECTION: { | ||
2221 | if (data_length == 0) { | 2219 | if (data_length == 0) { |
2222 | break; | 2220 | break; |
2223 | } | 2221 | } |