diff options
Diffstat (limited to 'toxav')
-rw-r--r-- | toxav/msi.c | 12 | ||||
-rw-r--r-- | toxav/rtp.c | 4 | ||||
-rw-r--r-- | toxav/rtp.h | 2 |
3 files changed, 9 insertions, 9 deletions
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) | |||
141 | m_callback_msi_packet((struct Messenger *) session->messenger, NULL, NULL); | 141 | m_callback_msi_packet((struct Messenger *) session->messenger, NULL, NULL); |
142 | 142 | ||
143 | if (pthread_mutex_trylock(session->mutex) != 0) { | 143 | if (pthread_mutex_trylock(session->mutex) != 0) { |
144 | LOGGER_ERROR(session->messenger->log, "Failed to aquire lock on msi mutex"); | 144 | LOGGER_ERROR(session->messenger->log, "Failed to acquire lock on msi mutex"); |
145 | return -1; | 145 | return -1; |
146 | } | 146 | } |
147 | 147 | ||
@@ -175,7 +175,7 @@ int msi_invite(MSISession *session, MSICall **call, uint32_t friend_number, uint | |||
175 | LOGGER_DEBUG(session->messenger->log, "Session: %p Inviting friend: %u", session, friend_number); | 175 | LOGGER_DEBUG(session->messenger->log, "Session: %p Inviting friend: %u", session, friend_number); |
176 | 176 | ||
177 | if (pthread_mutex_trylock(session->mutex) != 0) { | 177 | if (pthread_mutex_trylock(session->mutex) != 0) { |
178 | LOGGER_ERROR(session->messenger->log, "Failed to aquire lock on msi mutex"); | 178 | LOGGER_ERROR(session->messenger->log, "Failed to acquire lock on msi mutex"); |
179 | return -1; | 179 | return -1; |
180 | } | 180 | } |
181 | 181 | ||
@@ -220,7 +220,7 @@ int msi_hangup(MSICall *call) | |||
220 | call->friend_number); | 220 | call->friend_number); |
221 | 221 | ||
222 | if (pthread_mutex_trylock(session->mutex) != 0) { | 222 | if (pthread_mutex_trylock(session->mutex) != 0) { |
223 | LOGGER_ERROR(session->messenger->log, "Failed to aquire lock on msi mutex"); | 223 | LOGGER_ERROR(session->messenger->log, "Failed to acquire lock on msi mutex"); |
224 | return -1; | 224 | return -1; |
225 | } | 225 | } |
226 | 226 | ||
@@ -250,12 +250,12 @@ int msi_answer(MSICall *call, uint8_t capabilities) | |||
250 | LOGGER_DEBUG(session->messenger->log, "Session: %p Answering call from: %u", call->session, call->friend_number); | 250 | LOGGER_DEBUG(session->messenger->log, "Session: %p Answering call from: %u", call->session, call->friend_number); |
251 | 251 | ||
252 | if (pthread_mutex_trylock(session->mutex) != 0) { | 252 | if (pthread_mutex_trylock(session->mutex) != 0) { |
253 | LOGGER_ERROR(session->messenger->log, "Failed to aquire lock on msi mutex"); | 253 | LOGGER_ERROR(session->messenger->log, "Failed to acquire lock on msi mutex"); |
254 | return -1; | 254 | return -1; |
255 | } | 255 | } |
256 | 256 | ||
257 | if (call->state != msi_CallRequested) { | 257 | if (call->state != msi_CallRequested) { |
258 | /* Though sending in invalid state will not cause anything wierd | 258 | /* Though sending in invalid state will not cause anything weird |
259 | * Its better to not do it like a maniac */ | 259 | * Its better to not do it like a maniac */ |
260 | LOGGER_ERROR(session->messenger->log, "Call is in invalid state!"); | 260 | LOGGER_ERROR(session->messenger->log, "Call is in invalid state!"); |
261 | pthread_mutex_unlock(session->mutex); | 261 | pthread_mutex_unlock(session->mutex); |
@@ -289,7 +289,7 @@ int msi_change_capabilities(MSICall *call, uint8_t capabilities) | |||
289 | call->friend_number); | 289 | call->friend_number); |
290 | 290 | ||
291 | if (pthread_mutex_trylock(session->mutex) != 0) { | 291 | if (pthread_mutex_trylock(session->mutex) != 0) { |
292 | LOGGER_ERROR(session->messenger->log, "Failed to aquire lock on msi mutex"); | 292 | LOGGER_ERROR(session->messenger->log, "Failed to acquire lock on msi mutex"); |
293 | return -1; | 293 | return -1; |
294 | } | 294 | } |
295 | 295 | ||
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 | |||
141 | if (MAX_CRYPTO_DATA_SIZE > length + sizeof(struct RTPHeader) + 1) { | 141 | if (MAX_CRYPTO_DATA_SIZE > length + sizeof(struct RTPHeader) + 1) { |
142 | 142 | ||
143 | /** | 143 | /** |
144 | * The lenght is lesser than the maximum allowed lenght (including header) | 144 | * The length is lesser than the maximum allowed length (including header) |
145 | * Send the packet in single piece. | 145 | * Send the packet in single piece. |
146 | */ | 146 | */ |
147 | 147 | ||
@@ -153,7 +153,7 @@ int rtp_send_data(RTPSession *session, const uint8_t *data, uint16_t length, Log | |||
153 | } else { | 153 | } else { |
154 | 154 | ||
155 | /** | 155 | /** |
156 | * The lenght is greater than the maximum allowed lenght (including header) | 156 | * The length is greater than the maximum allowed length (including header) |
157 | * Send the packet in multiple pieces. | 157 | * Send the packet in multiple pieces. |
158 | */ | 158 | */ |
159 | 159 | ||
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 { | |||
62 | 62 | ||
63 | /* Non-standard TOX-specific fields */ | 63 | /* Non-standard TOX-specific fields */ |
64 | uint16_t cpart;/* Data offset of the current part */ | 64 | uint16_t cpart;/* Data offset of the current part */ |
65 | uint16_t tlen; /* Total message lenght */ | 65 | uint16_t tlen; /* Total message length */ |
66 | } __attribute__((packed)); | 66 | } __attribute__((packed)); |
67 | 67 | ||
68 | /* Check alignment */ | 68 | /* Check alignment */ |