|
Lines 1525-1532
process_server_config_line(ServerOptions
Link Here
|
| 1525 |
void |
1525 |
void |
| 1526 |
load_server_config(const char *filename, Buffer *conf) |
1526 |
load_server_config(const char *filename, Buffer *conf) |
| 1527 |
{ |
1527 |
{ |
| 1528 |
char line[1024], *cp; |
1528 |
char line[4096], *cp; |
| 1529 |
FILE *f; |
1529 |
FILE *f; |
|
|
1530 |
int lineno = 0; |
| 1530 |
|
1531 |
|
| 1531 |
debug2("%s: filename %s", __func__, filename); |
1532 |
debug2("%s: filename %s", __func__, filename); |
| 1532 |
if ((f = fopen(filename, "r")) == NULL) { |
1533 |
if ((f = fopen(filename, "r")) == NULL) { |
|
Lines 1535-1540
load_server_config(const char *filename,
Link Here
|
| 1535 |
} |
1536 |
} |
| 1536 |
buffer_clear(conf); |
1537 |
buffer_clear(conf); |
| 1537 |
while (fgets(line, sizeof(line), f)) { |
1538 |
while (fgets(line, sizeof(line), f)) { |
|
|
1539 |
lineno++; |
| 1540 |
if (strlen(line) == sizeof(line) - 1) |
| 1541 |
fatal("%s line %d too long", filename, lineno); |
| 1538 |
/* |
1542 |
/* |
| 1539 |
* Trim out comments and strip whitespace |
1543 |
* Trim out comments and strip whitespace |
| 1540 |
* NB - preserve newlines, they are needed to reproduce |
1544 |
* NB - preserve newlines, they are needed to reproduce |