mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
rename messenger function, prepend m_
This commit is contained in:
parent
f0f53dbd55
commit
d66b3eabd5
|
@ -173,7 +173,7 @@ void send_update(BWController *bwc)
|
|||
b_msg->lost = htonl(bwc->cycle.lost);
|
||||
b_msg->recv = htonl(bwc->cycle.recv);
|
||||
|
||||
if (-1 == send_custom_lossy_packet(bwc->m, bwc->friend_number, p_msg, sizeof(p_msg))) {
|
||||
if (-1 == m_send_custom_lossy_packet(bwc->m, bwc->friend_number, p_msg, sizeof(p_msg))) {
|
||||
LOGGER_WARNING(bwc->m->log, "BWC send failed (len: %d)! std error: %s", sizeof(p_msg), strerror(errno));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -148,7 +148,7 @@ int rtp_send_data(RTPSession *session, const uint8_t *data, uint16_t length, Log
|
|||
|
||||
memcpy(rdata + 1 + sizeof(struct RTPHeader), data, length);
|
||||
|
||||
if (-1 == send_custom_lossy_packet(session->m, session->friend_number, rdata, sizeof(rdata))) {
|
||||
if (-1 == m_send_custom_lossy_packet(session->m, session->friend_number, rdata, sizeof(rdata))) {
|
||||
LOGGER_WARNING(session->m->log, "RTP send failed (len: %d)! std error: %s", sizeof(rdata), strerror(errno));
|
||||
}
|
||||
} else {
|
||||
|
@ -164,7 +164,7 @@ int rtp_send_data(RTPSession *session, const uint8_t *data, uint16_t length, Log
|
|||
while ((length - sent) + sizeof(struct RTPHeader) + 1 > MAX_CRYPTO_DATA_SIZE) {
|
||||
memcpy(rdata + 1 + sizeof(struct RTPHeader), data + sent, piece);
|
||||
|
||||
if (-1 == send_custom_lossy_packet(session->m, session->friend_number,
|
||||
if (-1 == m_send_custom_lossy_packet(session->m, session->friend_number,
|
||||
rdata, piece + sizeof(struct RTPHeader) + 1)) {
|
||||
LOGGER_WARNING(session->m->log, "RTP send failed (len: %d)! std error: %s",
|
||||
piece + sizeof(struct RTPHeader) + 1, strerror(errno));
|
||||
|
@ -180,7 +180,7 @@ int rtp_send_data(RTPSession *session, const uint8_t *data, uint16_t length, Log
|
|||
if (piece) {
|
||||
memcpy(rdata + 1 + sizeof(struct RTPHeader), data + sent, piece);
|
||||
|
||||
if (-1 == send_custom_lossy_packet(session->m, session->friend_number, rdata,
|
||||
if (-1 == m_send_custom_lossy_packet(session->m, session->friend_number, rdata,
|
||||
piece + sizeof(struct RTPHeader) + 1)) {
|
||||
LOGGER_WARNING(session->m->log, "RTP send failed (len: %d)! std error: %s",
|
||||
piece + sizeof(struct RTPHeader) + 1, strerror(errno));
|
||||
|
|
|
@ -1782,7 +1782,7 @@ int m_callback_rtp_packet(Messenger *m, int32_t friendnumber, uint8_t byte, int
|
|||
}
|
||||
|
||||
|
||||
int send_custom_lossy_packet(const Messenger *m, int32_t friendnumber, const uint8_t *data, uint32_t length)
|
||||
int m_send_custom_lossy_packet(const Messenger *m, int32_t friendnumber, const uint8_t *data, uint32_t length)
|
||||
{
|
||||
if (friend_not_valid(m, friendnumber)) {
|
||||
return -1;
|
||||
|
|
|
@ -697,7 +697,7 @@ void custom_lossy_packet_registerhandler(Messenger *m, void (*packet_handler_cal
|
|||
* return -5 if packet failed to send because of other error.
|
||||
* return 0 on success.
|
||||
*/
|
||||
int send_custom_lossy_packet(const Messenger *m, int32_t friendnumber, const uint8_t *data, uint32_t length);
|
||||
int m_send_custom_lossy_packet(const Messenger *m, int32_t friendnumber, const uint8_t *data, uint32_t length);
|
||||
|
||||
|
||||
/* Set handlers for custom lossless packets.
|
||||
|
|
|
@ -1593,7 +1593,7 @@ bool tox_friend_send_lossy_packet(Tox *tox, uint32_t friend_number, const uint8_
|
|||
return 0;
|
||||
}
|
||||
|
||||
int ret = send_custom_lossy_packet(m, friend_number, data, length);
|
||||
int ret = m_send_custom_lossy_packet(m, friend_number, data, length);
|
||||
|
||||
set_custom_packet_error(ret, error);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user