mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-25 07:31:27 +00:00
Formatting: spaces around operators
This commit is contained in:
parent
aeacfbc2c0
commit
a8a20f570e
26
src/client.c
26
src/client.c
|
@ -833,7 +833,7 @@ tunnel_dns(int tun_fd, int dns_fd)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* read==1 happens with "QMEM" illegal replies, caused by
|
/* read == 1 happens with "QMEM" illegal replies, caused by
|
||||||
heavy reordering, or after short disconnections when
|
heavy reordering, or after short disconnections when
|
||||||
data-CMC has looped around into the "duplicate" values.
|
data-CMC has looped around into the "duplicate" values.
|
||||||
All these cases are helped by faster pinging. */
|
All these cases are helped by faster pinging. */
|
||||||
|
@ -1428,7 +1428,7 @@ handshake_login(int dns_fd, int seed)
|
||||||
|
|
||||||
login_calculate(login, 16, password, seed);
|
login_calculate(login, 16, password, seed);
|
||||||
|
|
||||||
for (i=0; running && i<5 ;i++) {
|
for (i = 0; running && i < 5; i++) {
|
||||||
|
|
||||||
send_login(dns_fd, login, 16);
|
send_login(dns_fd, login, 16);
|
||||||
|
|
||||||
|
@ -1481,7 +1481,7 @@ handshake_raw_udp(int dns_fd, int seed)
|
||||||
got_addr = 0;
|
got_addr = 0;
|
||||||
|
|
||||||
fprintf(stderr, "Testing raw UDP data to the server (skip with -r)");
|
fprintf(stderr, "Testing raw UDP data to the server (skip with -r)");
|
||||||
for (i=0; running && i<3 ;i++) {
|
for (i = 0; running && i < 3; i++) {
|
||||||
|
|
||||||
send_ip_request(dns_fd, userid);
|
send_ip_request(dns_fd, userid);
|
||||||
|
|
||||||
|
@ -1525,7 +1525,7 @@ handshake_raw_udp(int dns_fd, int seed)
|
||||||
/* do login against port 53 on remote server
|
/* do login against port 53 on remote server
|
||||||
* based on the old seed. If reply received,
|
* based on the old seed. If reply received,
|
||||||
* switch to raw udp mode */
|
* switch to raw udp mode */
|
||||||
for (i=0; running && i<4 ;i++) {
|
for (i = 0; running && i < 4; i++) {
|
||||||
tv.tv_sec = i + 1;
|
tv.tv_sec = i + 1;
|
||||||
tv.tv_usec = 0;
|
tv.tv_usec = 0;
|
||||||
|
|
||||||
|
@ -1576,7 +1576,7 @@ handshake_upenctest(int dns_fd, const char *s)
|
||||||
int slen;
|
int slen;
|
||||||
|
|
||||||
slen = strlen(s);
|
slen = strlen(s);
|
||||||
for (i=0; running && i<3 ;i++) {
|
for (i = 0; running && i < 3; i++) {
|
||||||
|
|
||||||
send_upenctest(dns_fd, s);
|
send_upenctest(dns_fd, s);
|
||||||
|
|
||||||
|
@ -1744,7 +1744,7 @@ handshake_downenctest(int dns_fd, char trycodec)
|
||||||
char *s = DOWNCODECCHECK1;
|
char *s = DOWNCODECCHECK1;
|
||||||
int slen = DOWNCODECCHECK1_LEN;
|
int slen = DOWNCODECCHECK1_LEN;
|
||||||
|
|
||||||
for (i=0; running && i<3 ;i++) {
|
for (i = 0; running && i < 3; i++) {
|
||||||
|
|
||||||
send_downenctest(dns_fd, trycodec, 1, NULL, 0);
|
send_downenctest(dns_fd, trycodec, 1, NULL, 0);
|
||||||
|
|
||||||
|
@ -1970,7 +1970,7 @@ handshake_edns0_check(int dns_fd)
|
||||||
else
|
else
|
||||||
trycodec = 'T';
|
trycodec = 'T';
|
||||||
|
|
||||||
for (i=0; running && i<3 ;i++) {
|
for (i = 0; running && i < 3; i++) {
|
||||||
|
|
||||||
send_downenctest(dns_fd, trycodec, 1, NULL, 0);
|
send_downenctest(dns_fd, trycodec, 1, NULL, 0);
|
||||||
|
|
||||||
|
@ -2021,7 +2021,7 @@ handshake_switch_codec(int dns_fd, int bits)
|
||||||
|
|
||||||
fprintf(stderr, "Switching upstream to codec %s\n", tempenc->name);
|
fprintf(stderr, "Switching upstream to codec %s\n", tempenc->name);
|
||||||
|
|
||||||
for (i=0; running && i<5 ;i++) {
|
for (i = 0; running && i < 5; i++) {
|
||||||
|
|
||||||
send_codec_switch(dns_fd, userid, bits);
|
send_codec_switch(dns_fd, userid, bits);
|
||||||
|
|
||||||
|
@ -2074,7 +2074,7 @@ handshake_switch_downenc(int dns_fd)
|
||||||
dname = "Raw";
|
dname = "Raw";
|
||||||
|
|
||||||
fprintf(stderr, "Switching downstream to codec %s\n", dname);
|
fprintf(stderr, "Switching downstream to codec %s\n", dname);
|
||||||
for (i=0; running && i<5 ;i++) {
|
for (i = 0; running && i < 5; i++) {
|
||||||
|
|
||||||
send_downenc_switch(dns_fd, userid);
|
send_downenc_switch(dns_fd, userid);
|
||||||
|
|
||||||
|
@ -2115,7 +2115,7 @@ handshake_try_lazy(int dns_fd)
|
||||||
int read;
|
int read;
|
||||||
|
|
||||||
fprintf(stderr, "Switching to lazy mode for low-latency\n");
|
fprintf(stderr, "Switching to lazy mode for low-latency\n");
|
||||||
for (i=0; running && i<5; i++) {
|
for (i = 0; running && i < 5 ;i++) {
|
||||||
|
|
||||||
send_lazy_switch(dns_fd, userid);
|
send_lazy_switch(dns_fd, userid);
|
||||||
|
|
||||||
|
@ -2159,7 +2159,7 @@ handshake_lazyoff(int dns_fd)
|
||||||
int i;
|
int i;
|
||||||
int read;
|
int read;
|
||||||
|
|
||||||
for (i=0; running && i<5; i++) {
|
for (i = 0; running && i < 5; i++) {
|
||||||
|
|
||||||
send_lazy_switch(dns_fd, userid);
|
send_lazy_switch(dns_fd, userid);
|
||||||
|
|
||||||
|
@ -2265,7 +2265,7 @@ handshake_autoprobe_fragsize(int dns_fd)
|
||||||
fprintf(stderr, "Autoprobing max downstream fragment size... (skip with -m fragsize)\n");
|
fprintf(stderr, "Autoprobing max downstream fragment size... (skip with -m fragsize)\n");
|
||||||
while (running && range > 0 && (range >= 8 || max_fragsize < 300)) {
|
while (running && range > 0 && (range >= 8 || max_fragsize < 300)) {
|
||||||
/* stop the slow probing early when we have enough bytes anyway */
|
/* stop the slow probing early when we have enough bytes anyway */
|
||||||
for (i=0; running && i<3 ;i++) {
|
for (i = 0; running && i < 3; i++) {
|
||||||
|
|
||||||
send_fragsize_probe(dns_fd, proposed_fragsize);
|
send_fragsize_probe(dns_fd, proposed_fragsize);
|
||||||
|
|
||||||
|
@ -2333,7 +2333,7 @@ handshake_set_fragsize(int dns_fd, int fragsize)
|
||||||
int read;
|
int read;
|
||||||
|
|
||||||
fprintf(stderr, "Setting downstream fragment size to max %d...\n", fragsize);
|
fprintf(stderr, "Setting downstream fragment size to max %d...\n", fragsize);
|
||||||
for (i=0; running && i<5 ;i++) {
|
for (i = 0; running && i < 5; i++) {
|
||||||
|
|
||||||
send_set_downstream_fragsize(dns_fd, fragsize);
|
send_set_downstream_fragsize(dns_fd, fragsize);
|
||||||
|
|
||||||
|
|
|
@ -540,7 +540,7 @@ int dns_decode(char *buf, size_t buflen, struct query *q, qr_t qr, char *packet,
|
||||||
|
|
||||||
memset(names, 0, sizeof(names));
|
memset(names, 0, sizeof(names));
|
||||||
|
|
||||||
for (i=0; i < ancount; i++) {
|
for (i = 0; i < ancount; i++) {
|
||||||
readname(packet, packetlen, &data, name, sizeof(name));
|
readname(packet, packetlen, &data, name, sizeof(name));
|
||||||
CHECKLEN(12);
|
CHECKLEN(12);
|
||||||
readshort(packet, &data, &type);
|
readshort(packet, &data, &type);
|
||||||
|
|
|
@ -1831,7 +1831,7 @@ tunnel(int tun_fd, struct dnsfd *dns_fds, int bind_fd, int max_idle_time)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i==0) {
|
if (i == 0) {
|
||||||
if (max_idle_time) {
|
if (max_idle_time) {
|
||||||
/* only trigger the check if that's worth (ie, no need to loop over if there
|
/* only trigger the check if that's worth (ie, no need to loop over if there
|
||||||
is something to send */
|
is something to send */
|
||||||
|
|
Loading…
Reference in a new issue