Format comments according to tokstyle's requirements.

This commit is contained in:
iphydf
2020-05-17 18:16:42 +01:00
parent fe8e0fb8fa
commit 03a511482f
12 changed files with 27 additions and 27 deletions
+4 -4
View File
@@ -30,10 +30,10 @@
#define VIDEO_SEND_X_KEYFRAMES_FIRST 7 // force the first n frames to be keyframes!
/*
VPX_DL_REALTIME (1) deadline parameter analogous to VPx REALTIME mode.
VPX_DL_GOOD_QUALITY (1000000) deadline parameter analogous to VPx GOOD QUALITY mode.
VPX_DL_BEST_QUALITY (0) deadline parameter analogous to VPx BEST QUALITY mode.
*/
* VPX_DL_REALTIME (1) deadline parameter analogous to VPx REALTIME mode.
* VPX_DL_GOOD_QUALITY (1000000) deadline parameter analogous to VPx GOOD QUALITY mode.
* VPX_DL_BEST_QUALITY (0) deadline parameter analogous to VPx BEST QUALITY mode.
*/
typedef struct ToxAVCall_s {
ToxAV *av;
+4 -4
View File
@@ -237,10 +237,10 @@ VCSession *vc_new(Mono_Time *mono_time, const Logger *log, ToxAV *av, uint32_t f
}
/*
VPX_CTRL_USE_TYPE(VP8E_SET_NOISE_SENSITIVITY, unsigned int)
control function to set noise sensitivity
0: off, 1: OnYOnly, 2: OnYUV, 3: OnYUVAggressive, 4: Adaptive
*/
* VPX_CTRL_USE_TYPE(VP8E_SET_NOISE_SENSITIVITY, unsigned int)
* control function to set noise sensitivity
* 0: off, 1: OnYOnly, 2: OnYUV, 3: OnYUVAggressive, 4: Adaptive
*/
#if 0
rc = vpx_codec_control(vc->encoder, VP8E_SET_NOISE_SENSITIVITY, 2);
+3 -3
View File
@@ -1294,7 +1294,7 @@ static void returnedip_ports(DHT *dht, IP_Port ip_port, const uint8_t *public_ke
}
/* Send a getnodes request.
sendback_node is the node that it will send back the response to (set to NULL to disable this) */
* sendback_node is the node that it will send back the response to (set to NULL to disable this) */
static int getnodes(DHT *dht, IP_Port ip_port, const uint8_t *public_key, const uint8_t *client_id,
const Node_format *sendback_node)
{
@@ -1427,7 +1427,7 @@ static int handle_getnodes(void *object, IP_Port source, const uint8_t *packet,
}
/* return false if no
return true if yes */
* return true if yes */
static bool sent_getnode_to_node(DHT *dht, const uint8_t *public_key, IP_Port node_ip_port, uint64_t ping_id,
Node_format *sendback_node)
{
@@ -2447,7 +2447,7 @@ static int handle_hardening(void *object, IP_Port source, const uint8_t *source_
length_nodes, 0);
/* TODO(irungentoo): MAX_SENT_NODES nodes should be returned at all times
(right now we have a small network size so it could cause problems for testing and etc..) */
* (right now we have a small network size so it could cause problems for testing and etc..) */
if (num_nodes <= 0) {
return 1;
}
+3 -3
View File
@@ -69,9 +69,9 @@ int create_request(const uint8_t *send_public_key, const uint8_t *send_secret_ke
const uint8_t *recv_public_key, const uint8_t *data, uint32_t length, uint8_t request_id);
/* puts the senders public key in the request in public_key, the data from the request
in data if a friend or ping request was sent to us and returns the length of the data.
packet is the request packet and length is its length
return -1 if not valid request. */
* in data if a friend or ping request was sent to us and returns the length of the data.
* packet is the request packet and length is its length
* return -1 if not valid request. */
int handle_request(const uint8_t *self_public_key, const uint8_t *self_secret_key, uint8_t *public_key, uint8_t *data,
uint8_t *request_id, const uint8_t *packet, uint16_t length);
+1 -1
View File
@@ -331,7 +331,7 @@ bool ip_is_lan(IP ip)
if (net_family_is_ipv6(ip.family)) {
/* autogenerated for each interface: `FE80::*` (up to `FEBF::*`)
`FF02::1` is - according to RFC 4291 - multicast all-nodes link-local */
* `FF02::1` is - according to RFC 4291 - multicast all-nodes link-local */
if (((ip.ip.v6.uint8[0] == 0xFF) && (ip.ip.v6.uint8[1] < 3) && (ip.ip.v6.uint8[15] == 1)) ||
((ip.ip.v6.uint8[0] == 0xFE) && ((ip.ip.v6.uint8[1] & 0xC0) == 0x80))) {
return true;
+1 -1
View File
@@ -2510,7 +2510,7 @@ static char *id_to_string(const uint8_t *pk, char *id_str, size_t length)
}
/* Minimum messenger run interval in ms
TODO(mannol): A/V */
* TODO(mannol): A/V */
#define MIN_RUN_INTERVAL 50
/* Return the time in milliseconds before do_messenger() should be called again
+1 -1
View File
@@ -30,7 +30,7 @@
#define TCP_CONNECTION_ANNOUNCE_TIMEOUT (TCP_CONNECTION_TIMEOUT)
/* The amount of recommended connections for each friend
NOTE: Must be at most (MAX_FRIEND_TCP_CONNECTIONS / 2) */
* NOTE: Must be at most (MAX_FRIEND_TCP_CONNECTIONS / 2) */
#define RECOMMENDED_FRIEND_TCP_CONNECTIONS (MAX_FRIEND_TCP_CONNECTIONS / 2)
/* Number of TCP connections used for onion purposes. */
+1 -1
View File
@@ -273,7 +273,7 @@ static unsigned int send_relays(Friend_Connections *fr_c, int friendcon_id)
for (int i = 0; i < n; ++i) {
/* Associated the relays being sent with this connection.
On receiving the peer will do the same which will establish the connection. */
* On receiving the peer will do the same which will establish the connection. */
friend_add_tcp_relay(fr_c, friendcon_id, nodes[i].ip_port, nodes[i].public_key);
}
+4 -4
View File
@@ -1119,7 +1119,7 @@ static int reset_max_speed_reached(Net_Crypto *c, int crypt_connection_id)
}
/* If last packet send failed, try to send packet again.
If sending it fails we won't be able to send the new packet. */
* If sending it fails we won't be able to send the new packet. */
if (conn->maximum_speed_reached) {
Packet_Data *dt = nullptr;
const uint32_t packet_num = conn->send_array.buffer_end - 1;
@@ -1157,7 +1157,7 @@ static int64_t send_lossless_packet(Net_Crypto *c, int crypt_connection_id, cons
}
/* If last packet send failed, try to send packet again.
If sending it fails we won't be able to send the new packet. */
* If sending it fails we won't be able to send the new packet. */
reset_max_speed_reached(c, crypt_connection_id);
if (conn->maximum_speed_reached && congestion_control) {
@@ -2480,7 +2480,7 @@ static int udp_handle_packet(void *object, IP_Port source, const uint8_t *packet
}
/* The dT for the average packet receiving rate calculations.
Also used as the */
* Also used as the */
#define PACKET_COUNTER_AVERAGE_INTERVAL 50
/* Ratio of recv queue size / recv packet rate (in seconds) times
@@ -2566,7 +2566,7 @@ static void send_crypto_packets(Net_Crypto *c)
conn->packets_resent = 0;
/* conjestion control
calculate a new value of conn->packet_send_rate based on some data
* calculate a new value of conn->packet_send_rate based on some data
*/
unsigned int pos = conn->last_sendqueue_counter % CONGESTION_QUEUE_ARRAY_SIZE;
+2 -2
View File
@@ -87,7 +87,7 @@
#define CRYPTO_SEND_PACKET_INTERVAL 1000
/* The maximum number of times we try to send the cookie request and handshake
before giving up. */
* before giving up. */
#define MAX_NUM_SENDPACKET_TRIES 8
/* The timeout of no received UDP packets before the direct UDP connection is considered dead. */
@@ -100,7 +100,7 @@
#define CRYPTO_MAX_PADDING 8
/* Base current transfer speed on last CONGESTION_QUEUE_ARRAY_SIZE number of points taken
at the dT defined in net_crypto.c */
* at the dT defined in net_crypto.c */
#define CONGESTION_QUEUE_ARRAY_SIZE 12
#define CONGESTION_LAST_SENT_ARRAY_SIZE (CONGESTION_QUEUE_ARRAY_SIZE * 2)
+2 -2
View File
@@ -21,7 +21,7 @@
#include "util.h"
/* defines for the array size and
timeout for onion announce packets. */
* timeout for onion announce packets. */
#define ANNOUNCE_ARRAY_SIZE 256
#define ANNOUNCE_TIMEOUT 10
@@ -1782,7 +1782,7 @@ static int onion_isconnected(const Onion_Client *onion_c)
}
/* Consider ourselves online if we are announced to half or more nodes
we are connected to */
* we are connected to */
if (num && announced) {
if ((num / 2) <= announced && (pnodes / 2) <= num) {
return 1;
+1 -1
View File
@@ -26,7 +26,7 @@
#define NUMBER_ONION_PATHS 6
/* The timeout the first time the path is added and
then for all the next consecutive times */
* then for all the next consecutive times */
#define ONION_PATH_FIRST_TIMEOUT 4
#define ONION_PATH_TIMEOUT 10
#define ONION_PATH_MAX_LIFETIME 1200