forked from Archive/PX4-Autopilot
Add missing lock
This commit is contained in:
parent
edccc826a1
commit
fbbfe61d74
|
@ -808,6 +808,8 @@ Mavlink::resend_message(mavlink_message_t *msg)
|
|||
return;
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&_send_mutex);
|
||||
|
||||
int buf_free = get_free_tx_buf();
|
||||
|
||||
_last_write_try_time = hrt_absolute_time();
|
||||
|
@ -819,6 +821,7 @@ Mavlink::resend_message(mavlink_message_t *msg)
|
|||
/* no enough space in buffer to send */
|
||||
count_txerr();
|
||||
count_txerrbytes(packet_len);
|
||||
pthread_mutex_unlock(&_send_mutex);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -842,6 +845,8 @@ Mavlink::resend_message(mavlink_message_t *msg)
|
|||
_last_write_success_time = _last_write_try_time;
|
||||
count_txbytes(packet_len);
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&_send_mutex);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue