Index: trunk/debs/squid/redirector.c |
— | — | @@ -26,20 +26,20 @@ |
27 | 27 | }; |
28 | 28 | |
29 | 29 | int load_in_buff(char *buff, struct IN_BUFF *in_buff) { |
30 | | - in_buff->url = strtok(buff, " "); |
31 | | - in_buff->src_address = strtok(NULL, " "); |
32 | | - in_buff->ident= strtok(NULL, " "); |
33 | | - in_buff->method= strtok(NULL, " \n");; |
| 30 | + in_buff->url = strtok(buff, " "); |
| 31 | + in_buff->src_address = strtok(NULL, " "); |
| 32 | + in_buff->ident= strtok(NULL, " "); |
| 33 | + in_buff->method= strtok(NULL, " \n");; |
| 34 | + |
| 35 | + if (!in_buff->src_address || !in_buff->ident || !in_buff->method) { |
| 36 | + return 1; |
| 37 | + } |
34 | 38 | |
35 | | - if (!in_buff->src_address || !in_buff->ident || !in_buff->method) { |
36 | | - return 1; |
37 | | - } |
38 | | - |
39 | | - if(strlen(in_buff->url) <= 4) { |
40 | | - return 1; |
41 | | - } |
| 39 | + if(strlen(in_buff->url) <= 4) { |
| 40 | + return 1; |
| 41 | + } |
42 | 42 | |
43 | | - return 0; |
| 43 | + return 0; |
44 | 44 | } |
45 | 45 | |
46 | 46 | int main(int argc, char **argv) { |
— | — | @@ -66,7 +66,7 @@ |
67 | 67 | sprintf(replacement_url, replacement_url_pattern, command_line_url); |
68 | 68 | } |
69 | 69 | |
70 | | - /* make standard output line buffered */ |
| 70 | + /* make standard output line buffered */ |
71 | 71 | //setvbuf(stdout, NULL, _IOLBF, 0); |
72 | 72 | |
73 | 73 | re = pcre_compile( |