rename messenger function, prepend m_

This commit is contained in:
Gregory Mullen (grayhatter) 2016-12-03 11:46:15 -08:00
parent f0f53dbd55
commit d66b3eabd5
No known key found for this signature in database
GPG Key ID: AEA10D4EA0530876
5 changed files with 9 additions and 9 deletions

View File

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

View File

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

View File

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

View File

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

View File

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