]>
Commit | Line | Data |
---|---|---|
f7f3304a | 1 | #include "squid-old.h" |
a22e6cd3 AR |
2 | #include "HttpRequest.h" |
3 | #include "HttpReply.h" | |
4 | #include "adaptation/ServiceFilter.h" | |
5 | ||
6 | ||
7 | Adaptation::ServiceFilter::ServiceFilter(Method aMethod, VectPoint aPoint, | |
e1381638 AJ |
8 | HttpRequest *aReq, HttpReply *aRep): method(aMethod), point(aPoint), |
9 | request(HTTPMSGLOCK(aReq)), | |
10 | reply(aRep ? HTTPMSGLOCK(aRep) : NULL) | |
a22e6cd3 AR |
11 | { |
12 | // a lot of code assumes that there is always a virgin request or cause | |
13 | assert(request); | |
14 | } | |
15 | ||
16 | Adaptation::ServiceFilter::ServiceFilter(const ServiceFilter &f): | |
e1381638 AJ |
17 | method(f.method), point(f.point), |
18 | request(HTTPMSGLOCK(f.request)), | |
19 | reply(f.reply ? HTTPMSGLOCK(f.reply) : NULL) | |
a22e6cd3 AR |
20 | { |
21 | } | |
22 | ||
23 | Adaptation::ServiceFilter::~ServiceFilter() | |
24 | { | |
25 | HTTPMSGUNLOCK(request); | |
26 | HTTPMSGUNLOCK(reply); | |
27 | } | |
28 | ||
29 | Adaptation::ServiceFilter &Adaptation::ServiceFilter::operator =(const ServiceFilter &f) | |
30 | { | |
31 | if (this != &f) { | |
32 | method = f.method; | |
33 | point = f.point; | |
34 | HTTPMSGUNLOCK(request); | |
35 | HTTPMSGUNLOCK(reply); | |
36 | request = HTTPMSGLOCK(f.request); | |
37 | reply = f.reply ? HTTPMSGLOCK(f.reply) : NULL; | |
38 | } | |
39 | return *this; | |
40 | } |