diff options
author | Pixel <Pixel> | 2001-11-29 01:03:21 +0000 |
---|---|---|
committer | Pixel <Pixel> | 2001-11-29 01:03:21 +0000 |
commit | 9788056af63e073607897559997a44272b9a5cef (patch) | |
tree | 7618f64e6c6409e4ffbe4d0906d208e25207c24c /lib/ReadJob.cc | |
parent | 775011d8a082368e3a41808c1c03115b6b78921e (diff) |
Regex done!
Diffstat (limited to 'lib/ReadJob.cc')
-rw-r--r-- | lib/ReadJob.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ReadJob.cc b/lib/ReadJob.cc index d5cabca..a29f641 100644 --- a/lib/ReadJob.cc +++ b/lib/ReadJob.cc @@ -1,7 +1,7 @@ #include "ReadJob.h" #include "HttpServ.h" -ReadJob::ReadJob(Handle * as, Handle * ad) : s(as), d(ad) { +ReadJob::ReadJob(Handle * as, Handle * ad, const Regex & aregex) : s(as), d(ad), regex(&aregex) { s->SetNonBlock(); d->SetNonBlock(); WaitFor(s, W4_READING); @@ -31,7 +31,7 @@ int ReadJob::Do() throw (GeneralException) { Suspend(TASK_ON_HOLD); } current = 0; - if (buff == "") return TASK_DONE; + if (regex->Match(buff)) return TASK_DONE; } if (!s->IsClosed()) { |