From 2651193b991f4b691aa978b079718606891c6d48 Mon Sep 17 00:00:00 2001 From: yangfl Date: Tue, 7 Nov 2017 23:56:18 +0800 Subject: [PATCH] Fix typo --- auto_tests/tox_test.c | 2 +- toxav/msi.c | 12 ++++++------ toxav/rtp.c | 4 ++-- toxav/rtp.h | 2 +- toxcore/TCP_connection.h | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/auto_tests/tox_test.c b/auto_tests/tox_test.c index 3613b9c4..06164194 100644 --- a/auto_tests/tox_test.c +++ b/auto_tests/tox_test.c @@ -246,7 +246,7 @@ static void tox_file_chunk_request(Tox *tox, uint32_t friend_number, uint32_t fi if (position + length > max_sending) { if (m_send_reached) { - ck_abort_msg("Requested done file tranfer."); + ck_abort_msg("Requested done file transfer."); } length = max_sending - position; diff --git a/toxav/msi.c b/toxav/msi.c index 197b0d5e..882dad04 100644 --- a/toxav/msi.c +++ b/toxav/msi.c @@ -141,7 +141,7 @@ int msi_kill(MSISession *session, Logger *log) m_callback_msi_packet((struct Messenger *) session->messenger, NULL, NULL); if (pthread_mutex_trylock(session->mutex) != 0) { - LOGGER_ERROR(session->messenger->log, "Failed to aquire lock on msi mutex"); + LOGGER_ERROR(session->messenger->log, "Failed to acquire lock on msi mutex"); return -1; } @@ -175,7 +175,7 @@ int msi_invite(MSISession *session, MSICall **call, uint32_t friend_number, uint LOGGER_DEBUG(session->messenger->log, "Session: %p Inviting friend: %u", session, friend_number); if (pthread_mutex_trylock(session->mutex) != 0) { - LOGGER_ERROR(session->messenger->log, "Failed to aquire lock on msi mutex"); + LOGGER_ERROR(session->messenger->log, "Failed to acquire lock on msi mutex"); return -1; } @@ -220,7 +220,7 @@ int msi_hangup(MSICall *call) call->friend_number); if (pthread_mutex_trylock(session->mutex) != 0) { - LOGGER_ERROR(session->messenger->log, "Failed to aquire lock on msi mutex"); + LOGGER_ERROR(session->messenger->log, "Failed to acquire lock on msi mutex"); return -1; } @@ -250,12 +250,12 @@ int msi_answer(MSICall *call, uint8_t capabilities) LOGGER_DEBUG(session->messenger->log, "Session: %p Answering call from: %u", call->session, call->friend_number); if (pthread_mutex_trylock(session->mutex) != 0) { - LOGGER_ERROR(session->messenger->log, "Failed to aquire lock on msi mutex"); + LOGGER_ERROR(session->messenger->log, "Failed to acquire lock on msi mutex"); return -1; } if (call->state != msi_CallRequested) { - /* Though sending in invalid state will not cause anything wierd + /* Though sending in invalid state will not cause anything weird * Its better to not do it like a maniac */ LOGGER_ERROR(session->messenger->log, "Call is in invalid state!"); pthread_mutex_unlock(session->mutex); @@ -289,7 +289,7 @@ int msi_change_capabilities(MSICall *call, uint8_t capabilities) call->friend_number); if (pthread_mutex_trylock(session->mutex) != 0) { - LOGGER_ERROR(session->messenger->log, "Failed to aquire lock on msi mutex"); + LOGGER_ERROR(session->messenger->log, "Failed to acquire lock on msi mutex"); return -1; } diff --git a/toxav/rtp.c b/toxav/rtp.c index 6f939082..350eeacd 100644 --- a/toxav/rtp.c +++ b/toxav/rtp.c @@ -141,7 +141,7 @@ int rtp_send_data(RTPSession *session, const uint8_t *data, uint16_t length, Log if (MAX_CRYPTO_DATA_SIZE > length + sizeof(struct RTPHeader) + 1) { /** - * The lenght is lesser than the maximum allowed lenght (including header) + * The length is lesser than the maximum allowed length (including header) * Send the packet in single piece. */ @@ -153,7 +153,7 @@ int rtp_send_data(RTPSession *session, const uint8_t *data, uint16_t length, Log } else { /** - * The lenght is greater than the maximum allowed lenght (including header) + * The length is greater than the maximum allowed length (including header) * Send the packet in multiple pieces. */ diff --git a/toxav/rtp.h b/toxav/rtp.h index 26de5764..2f5ea84f 100644 --- a/toxav/rtp.h +++ b/toxav/rtp.h @@ -62,7 +62,7 @@ struct RTPHeader { /* Non-standard TOX-specific fields */ uint16_t cpart;/* Data offset of the current part */ - uint16_t tlen; /* Total message lenght */ + uint16_t tlen; /* Total message length */ } __attribute__((packed)); /* Check alignment */ diff --git a/toxcore/TCP_connection.h b/toxcore/TCP_connection.h index f023b1ab..a45129a7 100644 --- a/toxcore/TCP_connection.h +++ b/toxcore/TCP_connection.h @@ -41,7 +41,7 @@ #define MAX_FRIEND_TCP_CONNECTIONS 6 -/* Time until connection to friend gets killed (if it doesn't get locked withing that time) */ +/* Time until connection to friend gets killed (if it doesn't get locked within that time) */ #define TCP_CONNECTION_ANNOUNCE_TIMEOUT (TCP_CONNECTION_TIMEOUT) /* The amount of recommended connections for each friend