This commit is contained in:
yangfl 2017-11-07 23:56:18 +08:00 committed by Robin Lindén
parent 4d94a07d25
commit 2651193b99
No known key found for this signature in database
GPG Key ID: 601A604B7E605776
5 changed files with 11 additions and 11 deletions

View File

@ -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;

View File

@ -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;
}

View File

@ -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.
*/

View File

@ -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 */

View File

@ -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