From b6b3cdbf2551d001478441576d55a14b764889fb Mon Sep 17 00:00:00 2001 From: iphydf Date: Thu, 19 Jul 2018 21:54:30 +0000 Subject: [PATCH] Synchronise parameter names in headers with those in the implementation. --- toxav/bwcontroller.h | 4 ++-- toxcore/Messenger.h | 6 +++--- toxcore/TCP_client.h | 2 +- toxcore/network.h | 8 ++++---- toxcore/onion_client.h | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/toxav/bwcontroller.h b/toxav/bwcontroller.h index be5eb191..fdbc1746 100644 --- a/toxav/bwcontroller.h +++ b/toxav/bwcontroller.h @@ -30,7 +30,7 @@ BWController *bwc_new(Messenger *m, uint32_t friendnumber, void bwc_kill(BWController *bwc); -void bwc_add_lost(BWController *bwc, uint32_t bytes); -void bwc_add_recv(BWController *bwc, uint32_t bytes); +void bwc_add_lost(BWController *bwc, uint32_t bytes_lost); +void bwc_add_recv(BWController *bwc, uint32_t recv_bytes); #endif /* BWCONROLLER_H */ diff --git a/toxcore/Messenger.h b/toxcore/Messenger.h index 8a4686f1..cd872a2d 100644 --- a/toxcore/Messenger.h +++ b/toxcore/Messenger.h @@ -689,14 +689,14 @@ int m_msi_packet(const Messenger *m, int32_t friendnumber, const uint8_t *data, * return 0 on success. */ int m_callback_rtp_packet(Messenger *m, int32_t friendnumber, uint8_t byte, - m_lossy_rtp_packet_cb *packet_handler_callback, void *object); + m_lossy_rtp_packet_cb *function, void *object); /**********************************************/ /* Set handlers for custom lossy packets. * */ -void custom_lossy_packet_registerhandler(Messenger *m, m_friend_lossy_packet_cb *packet_handler_callback); +void custom_lossy_packet_registerhandler(Messenger *m, m_friend_lossy_packet_cb *lossy_packethandler); /* High level function to send custom lossy packets. * @@ -713,7 +713,7 @@ int m_send_custom_lossy_packet(const Messenger *m, int32_t friendnumber, const u /* Set handlers for custom lossless packets. * */ -void custom_lossless_packet_registerhandler(Messenger *m, m_friend_lossless_packet_cb *packet_handler_callback); +void custom_lossless_packet_registerhandler(Messenger *m, m_friend_lossless_packet_cb *lossless_packethandler); /* High level function to send custom lossless packets. * diff --git a/toxcore/TCP_client.h b/toxcore/TCP_client.h index 8bfe4155..6d1cbb3b 100644 --- a/toxcore/TCP_client.h +++ b/toxcore/TCP_client.h @@ -60,7 +60,7 @@ TCP_Client_Status tcp_con_status(const TCP_Client_Connection *con); void *tcp_con_custom_object(const TCP_Client_Connection *con); uint32_t tcp_con_custom_uint(const TCP_Client_Connection *con); void tcp_con_set_custom_object(TCP_Client_Connection *con, void *object); -void tcp_con_set_custom_uint(TCP_Client_Connection *con, uint32_t uint); +void tcp_con_set_custom_uint(TCP_Client_Connection *con, uint32_t value); /* Create new TCP connection to ip_port/public_key */ diff --git a/toxcore/network.h b/toxcore/network.h index 7f7cde60..276896b6 100644 --- a/toxcore/network.h +++ b/toxcore/network.h @@ -76,19 +76,19 @@ extern const Socket net_invalid_socket; /** * Calls send(sockfd, buf, len, MSG_NOSIGNAL). */ -int net_send(Socket sockfd, const void *buf, size_t len); +int net_send(Socket sock, const void *buf, size_t len); /** * Calls recv(sockfd, buf, len, MSG_NOSIGNAL). */ -int net_recv(Socket sockfd, void *buf, size_t len); +int net_recv(Socket sock, void *buf, size_t len); /** * Calls listen(sockfd, backlog). */ -int net_listen(Socket sockfd, int backlog); +int net_listen(Socket sock, int backlog); /** * Calls accept(sockfd, nullptr, nullptr). */ -Socket net_accept(Socket sockfd); +Socket net_accept(Socket sock); /** * return the amount of data in the tcp recv buffer. diff --git a/toxcore/onion_client.h b/toxcore/onion_client.h index 6e73c3ab..660ccdd2 100644 --- a/toxcore/onion_client.h +++ b/toxcore/onion_client.h @@ -135,7 +135,7 @@ typedef int recv_tcp_relay_cb(void *object, uint32_t number, IP_Port ip_port, co * return 0 on success. */ int recv_tcp_relay_handler(Onion_Client *onion_c, int friend_num, - recv_tcp_relay_cb *tcp_relay_node_callback, void *object, uint32_t number); + recv_tcp_relay_cb *callback, void *object, uint32_t number); typedef void onion_dht_pk_cb(void *data, int32_t number, const uint8_t *dht_public_key, void *userdata);