From d66b3eabd5a243d8389dcdb9a091f1d4814315d2 Mon Sep 17 00:00:00 2001 From: "Gregory Mullen (grayhatter)" Date: Sat, 3 Dec 2016 11:46:15 -0800 Subject: [PATCH] rename messenger function, prepend m_ --- toxav/bwcontroller.c | 2 +- toxav/rtp.c | 10 +++++----- toxcore/Messenger.c | 2 +- toxcore/Messenger.h | 2 +- toxcore/tox.c | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/toxav/bwcontroller.c b/toxav/bwcontroller.c index 48afba82..b7390e4a 100644 --- a/toxav/bwcontroller.c +++ b/toxav/bwcontroller.c @@ -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)); } } diff --git a/toxav/rtp.c b/toxav/rtp.c index f453ff5b..1c6bed75 100644 --- a/toxav/rtp.c +++ b/toxav/rtp.c @@ -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,8 +164,8 @@ 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, - rdata, piece + sizeof(struct RTPHeader) + 1)) { + 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,8 +180,8 @@ 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, - piece + sizeof(struct RTPHeader) + 1)) { + 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)); } diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index be311fa1..1771059a 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c @@ -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; diff --git a/toxcore/Messenger.h b/toxcore/Messenger.h index 8f9a83a9..9bc4c451 100644 --- a/toxcore/Messenger.h +++ b/toxcore/Messenger.h @@ -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. diff --git a/toxcore/tox.c b/toxcore/tox.c index 6317d126..f964e18c 100644 --- a/toxcore/tox.c +++ b/toxcore/tox.c @@ -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);