diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-01-11 17:20:00 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-01-11 17:20:00 +0000 |
commit | f7996f3b700a22797565e9aa57e251e6e3ac1e4d (patch) | |
tree | af4e797eef0a65f4e3dba94b325da0ec08452d36 /networking | |
parent | 3821fb13ea404d243115ff8ec161273b62826513 (diff) | |
download | busybox-w32-f7996f3b700a22797565e9aa57e251e6e3ac1e4d.tar.gz busybox-w32-f7996f3b700a22797565e9aa57e251e6e3ac1e4d.tar.bz2 busybox-w32-f7996f3b700a22797565e9aa57e251e6e3ac1e4d.zip |
Trailing whitespace removal over entire tree
Diffstat (limited to 'networking')
-rw-r--r-- | networking/dnsd.c | 4 | ||||
-rw-r--r-- | networking/fakeidentd.c | 98 | ||||
-rw-r--r-- | networking/httpd.c | 4 | ||||
-rw-r--r-- | networking/interface.c | 2 | ||||
-rw-r--r-- | networking/libiproute/iproute.c | 2 | ||||
-rw-r--r-- | networking/libiproute/ll_map.c | 2 | ||||
-rw-r--r-- | networking/nslookup.c | 6 | ||||
-rw-r--r-- | networking/ping6.c | 2 | ||||
-rw-r--r-- | networking/telnetd.c | 2 |
9 files changed, 61 insertions, 61 deletions
diff --git a/networking/dnsd.c b/networking/dnsd.c index 6f1ec0ea4..1fb9ccfe5 100644 --- a/networking/dnsd.c +++ b/networking/dnsd.c | |||
@@ -230,7 +230,7 @@ static int table_lookup(uint16_t type, uint8_t * as, uint8_t * qs) | |||
230 | char *p,*q; | 230 | char *p,*q; |
231 | q = (char *)&(qs[1]); | 231 | q = (char *)&(qs[1]); |
232 | p = &(d->name[1]); | 232 | p = &(d->name[1]); |
233 | fprintf(stderr, "\n%s: %d/%d p:%s q:%s %d", | 233 | fprintf(stderr, "\n%s: %d/%d p:%s q:%s %d", |
234 | __FUNCTION__, strlen(p), (int)(d->name[0]), p, q, strlen(q)); | 234 | __FUNCTION__, strlen(p), (int)(d->name[0]), p, q, strlen(q)); |
235 | #endif | 235 | #endif |
236 | if (type == REQ_A) { /* search by host name */ | 236 | if (type == REQ_A) { /* search by host name */ |
@@ -247,7 +247,7 @@ static int table_lookup(uint16_t type, uint8_t * as, uint8_t * qs) | |||
247 | #endif | 247 | #endif |
248 | return 0; | 248 | return 0; |
249 | } | 249 | } |
250 | } else | 250 | } else |
251 | if (type == REQ_PTR) { /* search by IP-address */ | 251 | if (type == REQ_PTR) { /* search by IP-address */ |
252 | if (!strncmp((char*)&d->rip[1], (char*)&qs[1], strlen(d->rip)-1)) { | 252 | if (!strncmp((char*)&d->rip[1], (char*)&qs[1], strlen(d->rip)-1)) { |
253 | strcpy((char *)as, d->name); | 253 | strcpy((char *)as, d->name); |
diff --git a/networking/fakeidentd.c b/networking/fakeidentd.c index 8967a7a38..7eac48065 100644 --- a/networking/fakeidentd.c +++ b/networking/fakeidentd.c | |||
@@ -240,68 +240,68 @@ int fakeidentd_main(int argc, char **argv) | |||
240 | 240 | ||
241 | /* main loop where we process all events and never exit */ | 241 | /* main loop where we process all events and never exit */ |
242 | while (1) { | 242 | while (1) { |
243 | fd_set rfds = G.readfds; | 243 | fd_set rfds = G.readfds; |
244 | struct timeval tv = { 15, 0 }; | 244 | struct timeval tv = { 15, 0 }; |
245 | int i; | 245 | int i; |
246 | int tim = time(NULL); | 246 | int tim = time(NULL); |
247 | 247 | ||
248 | select(G.conncnt + FCS, &rfds, NULL, NULL, G.conncnt? &tv: NULL); | 248 | select(G.conncnt + FCS, &rfds, NULL, NULL, G.conncnt? &tv: NULL); |
249 | 249 | ||
250 | for (i = G.conncnt - 1; i >= 0; i--) { | 250 | for (i = G.conncnt - 1; i >= 0; i--) { |
251 | int s = i + FCS; | 251 | int s = i + FCS; |
252 | 252 | ||
253 | if (FD_ISSET(s, &rfds)) { | 253 | if (FD_ISSET(s, &rfds)) { |
254 | char *buf = conns[i].buf; | 254 | char *buf = conns[i].buf; |
255 | unsigned int len = conns[i].len; | 255 | unsigned int len = conns[i].len; |
256 | unsigned int l; | 256 | unsigned int l; |
257 | 257 | ||
258 | if ((l = read(s, buf + len, sizeof(conns[0].buf) - len)) > 0) { | 258 | if ((l = read(s, buf + len, sizeof(conns[0].buf) - len)) > 0) { |
259 | if (checkInput(buf, len, l)) { | 259 | if (checkInput(buf, len, l)) { |
260 | reply(s, buf); | 260 | reply(s, buf); |
261 | goto deleteconn; | 261 | goto deleteconn; |
262 | } else if (len + l >= sizeof(conns[0].buf)) { | 262 | } else if (len + l >= sizeof(conns[0].buf)) { |
263 | replyError(s, "X-INVALID-REQUEST"); | 263 | replyError(s, "X-INVALID-REQUEST"); |
264 | goto deleteconn; | 264 | goto deleteconn; |
265 | } else { | ||
266 | conns[i].len += l; | ||
267 | } | ||
265 | } else { | 268 | } else { |
266 | conns[i].len += l; | 269 | goto deleteconn; |
267 | } | 270 | } |
268 | } else { | ||
269 | goto deleteconn; | ||
270 | } | ||
271 | 271 | ||
272 | conns[i].lasttime = tim; | 272 | conns[i].lasttime = tim; |
273 | continue; | 273 | continue; |
274 | 274 | ||
275 | deleteconn: | 275 | deleteconn: |
276 | deleteConn(s); | ||
277 | } else { | ||
278 | /* implement as time_after() in linux kernel sources ... */ | ||
279 | if (conns[i].lasttime + MAXIDLETIME <= tim) { | ||
280 | replyError(s, "X-TIMEOUT"); | ||
281 | deleteConn(s); | 276 | deleteConn(s); |
277 | } else { | ||
278 | /* implement as time_after() in linux kernel sources ... */ | ||
279 | if (conns[i].lasttime + MAXIDLETIME <= tim) { | ||
280 | replyError(s, "X-TIMEOUT"); | ||
281 | deleteConn(s); | ||
282 | } | ||
282 | } | 283 | } |
283 | } | 284 | } |
284 | } | ||
285 | 285 | ||
286 | if (FD_ISSET(0, &rfds)) { | 286 | if (FD_ISSET(0, &rfds)) { |
287 | int s = accept(0, NULL, 0); | 287 | int s = accept(0, NULL, 0); |
288 | 288 | ||
289 | if (s < 0) { | 289 | if (s < 0) { |
290 | if (errno != EINTR) /* EINTR */ | 290 | if (errno != EINTR) /* EINTR */ |
291 | bb_perror_msg("accept"); | 291 | bb_perror_msg("accept"); |
292 | } else { | 292 | } else { |
293 | if (G.conncnt == MAXCONNS) | 293 | if (G.conncnt == MAXCONNS) |
294 | i = closeOldest(); | 294 | i = closeOldest(); |
295 | else | 295 | else |
296 | i = G.conncnt++; | 296 | i = G.conncnt++; |
297 | 297 | ||
298 | movefd(s, i + FCS); /* move if not already there */ | 298 | movefd(s, i + FCS); /* move if not already there */ |
299 | FD_SET(i + FCS, &G.readfds); | 299 | FD_SET(i + FCS, &G.readfds); |
300 | 300 | ||
301 | conns[i].len = 0; | 301 | conns[i].len = 0; |
302 | conns[i].lasttime = time(NULL); | 302 | conns[i].lasttime = time(NULL); |
303 | } | ||
303 | } | 304 | } |
304 | } | ||
305 | } /* end of while (1) */ | 305 | } /* end of while (1) */ |
306 | 306 | ||
307 | return 0; | 307 | return 0; |
diff --git a/networking/httpd.c b/networking/httpd.c index da33146de..818590f78 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
@@ -715,7 +715,7 @@ static char *decodeString(char *orig, int option_d) | |||
715 | } | 715 | } |
716 | value1 = value1 * 16 + value2; | 716 | value1 = value1 * 16 + value2; |
717 | if (!option_d && (value1 == '/' || value1 == '\0')) { | 717 | if (!option_d && (value1 == '/' || value1 == '\0')) { |
718 | /* caller takes it as indication of invalid | 718 | /* caller takes it as indication of invalid |
719 | * (dangerous wrt exploits) chars */ | 719 | * (dangerous wrt exploits) chars */ |
720 | return orig + 1; | 720 | return orig + 1; |
721 | } | 721 | } |
@@ -998,7 +998,7 @@ static int sendCgi(const char *url, | |||
998 | pid = fork(); | 998 | pid = fork(); |
999 | if (pid < 0) | 999 | if (pid < 0) |
1000 | return 0; | 1000 | return 0; |
1001 | 1001 | ||
1002 | if (!pid) { | 1002 | if (!pid) { |
1003 | /* child process */ | 1003 | /* child process */ |
1004 | char *script; | 1004 | char *script; |
diff --git a/networking/interface.c b/networking/interface.c index 6d23e9bfc..d47059220 100644 --- a/networking/interface.c +++ b/networking/interface.c | |||
@@ -116,7 +116,7 @@ static int INET_getsock(char *bufp, struct sockaddr *sap) | |||
116 | sock_in = (struct sockaddr_in *) sap; | 116 | sock_in = (struct sockaddr_in *) sap; |
117 | sock_in->sin_family = AF_INET; | 117 | sock_in->sin_family = AF_INET; |
118 | sock_in->sin_port = 0; | 118 | sock_in->sin_port = 0; |
119 | 119 | ||
120 | val = 0; | 120 | val = 0; |
121 | bp = (char *) &val; | 121 | bp = (char *) &val; |
122 | for (i = 0; i < sizeof(sock_in->sin_addr.s_addr); i++) { | 122 | for (i = 0; i < sizeof(sock_in->sin_addr.s_addr); i++) { |
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c index 2ff99570e..c4c3fc2ca 100644 --- a/networking/libiproute/iproute.c +++ b/networking/libiproute/iproute.c | |||
@@ -562,7 +562,7 @@ static int iproute_list_or_flush(int argc, char **argv, int flush) | |||
562 | if (matches(*argv, "cache") == 0) { | 562 | if (matches(*argv, "cache") == 0) { |
563 | filter.tb = -1; | 563 | filter.tb = -1; |
564 | #if 0 && ENABLE_FEATURE_IP_RULE | 564 | #if 0 && ENABLE_FEATURE_IP_RULE |
565 | 565 | ||
566 | #else | 566 | #else |
567 | } else if (matches(*argv, "main") != 0) { | 567 | } else if (matches(*argv, "main") != 0) { |
568 | invarg(*argv, "table"); | 568 | invarg(*argv, "table"); |
diff --git a/networking/libiproute/ll_map.c b/networking/libiproute/ll_map.c index a14fa4e42..f429763eb 100644 --- a/networking/libiproute/ll_map.c +++ b/networking/libiproute/ll_map.c | |||
@@ -169,7 +169,7 @@ int ll_name_to_index(char *name) | |||
169 | * to the reader... Jean II */ | 169 | * to the reader... Jean II */ |
170 | return ifr.ifr_ifindex; | 170 | return ifr.ifr_ifindex; |
171 | } | 171 | } |
172 | 172 | ||
173 | return 0; | 173 | return 0; |
174 | } | 174 | } |
175 | 175 | ||
diff --git a/networking/nslookup.c b/networking/nslookup.c index cc5ff95d6..4beecc63b 100644 --- a/networking/nslookup.c +++ b/networking/nslookup.c | |||
@@ -23,7 +23,7 @@ | |||
23 | * $ nslookup yahoo.com | 23 | * $ nslookup yahoo.com |
24 | * Server: 128.193.0.10 | 24 | * Server: 128.193.0.10 |
25 | * Address: 128.193.0.10#53 | 25 | * Address: 128.193.0.10#53 |
26 | * | 26 | * |
27 | * Non-authoritative answer: | 27 | * Non-authoritative answer: |
28 | * Name: yahoo.com | 28 | * Name: yahoo.com |
29 | * Address: 216.109.112.135 | 29 | * Address: 216.109.112.135 |
@@ -33,11 +33,11 @@ | |||
33 | * $ nslookup 204.152.191.37 | 33 | * $ nslookup 204.152.191.37 |
34 | * Server: 128.193.4.20 | 34 | * Server: 128.193.4.20 |
35 | * Address: 128.193.4.20#53 | 35 | * Address: 128.193.4.20#53 |
36 | * | 36 | * |
37 | * Non-authoritative answer: | 37 | * Non-authoritative answer: |
38 | * 37.191.152.204.in-addr.arpa canonical name = 37.32-27.191.152.204.in-addr.arpa. | 38 | * 37.191.152.204.in-addr.arpa canonical name = 37.32-27.191.152.204.in-addr.arpa. |
39 | * 37.32-27.191.152.204.in-addr.arpa name = zeus-pub2.kernel.org. | 39 | * 37.32-27.191.152.204.in-addr.arpa name = zeus-pub2.kernel.org. |
40 | * | 40 | * |
41 | * Authoritative answers can be found from: | 41 | * Authoritative answers can be found from: |
42 | * 32-27.191.152.204.in-addr.arpa nameserver = ns1.kernel.org. | 42 | * 32-27.191.152.204.in-addr.arpa nameserver = ns1.kernel.org. |
43 | * 32-27.191.152.204.in-addr.arpa nameserver = ns2.kernel.org. | 43 | * 32-27.191.152.204.in-addr.arpa nameserver = ns2.kernel.org. |
diff --git a/networking/ping6.c b/networking/ping6.c index fd18cc877..5cb02f51a 100644 --- a/networking/ping6.c +++ b/networking/ping6.c | |||
@@ -420,7 +420,7 @@ int ping6_main(int argc, char **argv) | |||
420 | datalen = DEFDATALEN; /* initialized here rather than in global scope to work around gcc bug */ | 420 | datalen = DEFDATALEN; /* initialized here rather than in global scope to work around gcc bug */ |
421 | 421 | ||
422 | /* exactly one argument needed, -v and -q don't mix */ | 422 | /* exactly one argument needed, -v and -q don't mix */ |
423 | opt_complementary = "=1:q--v:v--q"; | 423 | opt_complementary = "=1:q--v:v--q"; |
424 | getopt32(argc, argv, OPT_STRING, &opt_c, &opt_s, &opt_I); | 424 | getopt32(argc, argv, OPT_STRING, &opt_c, &opt_s, &opt_I); |
425 | if (option_mask32 & 4) pingcount = xatoul(opt_c); // -c | 425 | if (option_mask32 & 4) pingcount = xatoul(opt_c); // -c |
426 | if (option_mask32 & 8) datalen = xatou16(opt_s); // -s | 426 | if (option_mask32 & 8) datalen = xatou16(opt_s); // -s |
diff --git a/networking/telnetd.c b/networking/telnetd.c index a0ee2c345..dd5d55de0 100644 --- a/networking/telnetd.c +++ b/networking/telnetd.c | |||
@@ -286,7 +286,7 @@ make_new_session( | |||
286 | ts->shell_pid = pid; | 286 | ts->shell_pid = pid; |
287 | return ts; | 287 | return ts; |
288 | } | 288 | } |
289 | 289 | ||
290 | /* child */ | 290 | /* child */ |
291 | 291 | ||
292 | /* open the child's side of the tty. */ | 292 | /* open the child's side of the tty. */ |