Skip to content

Commit b5ed6a7

Browse files
committed
On invalid line read, don't bail out, just read the next line if available.
On repeated line without previous known address, don't bail out, just read the next line if available.
1 parent 3c7fb3f commit b5ed6a7

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2015-02-05 Pierre Schweitzer <pierre@reactos.org>
2+
3+
* ForbidHosts.cpp: On invalid line read, don't bail out, just read the next line if available.
4+
* ForbidHosts.cpp: On repeated line without previous known address, don't bail out, just read the next line if available.
5+
16
2015-01-17 Pierre Schweitzer <pierre@reactos.org>
27

38
* ForbidHosts.cpp: Add a wait loop when attempting to reopen auth.log after log rotation.

ForbidHosts.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,11 +432,11 @@ static void ReadLine(int File, std::vector<HostIP> & Hosts) {
432432
Repeated = IsLastRepeated(Line);
433433
if (Repeated == 0) {
434434
LastAddress = "";
435-
return;
435+
continue;
436436
}
437437
} else {
438438
LastAddress = "";
439-
return;
439+
continue;
440440
}
441441
} else {
442442
// Get the host

0 commit comments

Comments
 (0)