]> git.pld-linux.org Git - packages/squid.git/blob - squid-3.0.PRE3-PURIFY.patch
- unifications
[packages/squid.git] / squid-3.0.PRE3-PURIFY.patch
1 Index: squid3/src/DelayId.cc
2 diff -c squid3/src/DelayId.cc:1.13 squid3/src/DelayId.cc:1.14
3 *** squid3/src/DelayId.cc:1.13  Sun Aug 10 05:00:40 2003
4 --- squid3/src/DelayId.cc       Sat Sep  6 06:47:34 2003
5 ***************
6 *** 171,179 ****
7       if (markedAsNoDelay)
8           return;
9   
10 !     unsigned short tempPool = pool() - 1;
11
12 !     assert (tempPool != 0xFFFF);
13   
14       if (compositeId.getRaw())
15           compositeId->bytesIn(qty);
16 --- 171,177 ----
17       if (markedAsNoDelay)
18           return;
19   
20 !     assert ((unsigned short)(pool() - 1) != 0xFFFF);
21   
22       if (compositeId.getRaw())
23           compositeId->bytesIn(qty);
24 Index: squid3/src/client_side.cc
25 diff -c squid3/src/client_side.cc:1.658 squid3/src/client_side.cc:1.659
26 *** squid3/src/client_side.cc:1.658     Sun Aug 31 21:49:38 2003
27 --- squid3/src/client_side.cc   Sat Sep  6 06:47:34 2003
28 ***************
29 *** 142,148 ****
30 --- 142,150 ----
31   static void clientUpdateHierCounters(HierarchyLogEntry *);
32   static bool clientPingHasFinished(ping_data const *aPing);
33   static void clientPrepareLogWithRequestDetails(HttpRequest *, AccessLogEntry *);
34 + #ifndef PURIFY
35   static int connIsUsable(ConnStateData::Pointer conn);
36 + #endif
37   static int responseFinishedOrFailed(HttpReply * rep, StoreIOBuffer const &recievedData);
38   static void ClientSocketContextPushDeferredIfNeeded(ClientSocketContext::Pointer deferredRequest, ConnStateData::Pointer & conn);
39   static void clientUpdateSocketStats(log_type logType, size_t size);
40 ***************
41 *** 692,697 ****
42 --- 694,700 ----
43       return 0;
44   }
45   
46 + #ifndef PURIFY
47   int
48   connIsUsable(ConnStateData::Pointer conn)
49   {
50 ***************
51 *** 701,706 ****
52 --- 704,711 ----
53       return 1;
54   }
55   
56 + #endif
57
58   ClientSocketContext::Pointer
59   ConnStateData::getCurrentContext() const
60   {
61 ***************
62 *** 1243,1251 ****
63       assert(cbdataReferenceValid(node));
64       /* Set null by ContextFree */
65       assert(node->node.next == NULL);
66 -     ClientSocketContext *context = dynamic_cast<ClientSocketContext *>(node->data.getRaw());
67       /* this is the assert discussed above */
68 !     assert(context == NULL);
69       /* We are only called when the client socket shutsdown.
70        * Tell the prev pipeline member we're finished
71        */
72 --- 1248,1255 ----
73       assert(cbdataReferenceValid(node));
74       /* Set null by ContextFree */
75       assert(node->node.next == NULL);
76       /* this is the assert discussed above */
77 !     assert(NULL == dynamic_cast<ClientSocketContext *>(node->data.getRaw()));
78       /* We are only called when the client socket shutsdown.
79        * Tell the prev pipeline member we're finished
80        */
81 Index: squid3/src/client_side_request.cc
82 diff -c squid3/src/client_side_request.cc:1.33 squid3/src/client_side_request.cc:1.34
83 *** squid3/src/client_side_request.cc:1.33      Sun Aug 31 21:49:38 2003
84 --- squid3/src/client_side_request.cc   Sat Sep  6 06:47:34 2003
85 ***************
86 *** 800,806 ****
87   ClientRequestContext::CheckNoCacheDone(int answer, void *data)
88   {
89       void *temp;
90 !     bool valid = cbdataReferenceValidDone(data, &temp);
91       /* acl NB calls cannot invalidate cbdata in the normal course of things */
92       assert (valid);
93       ClientRequestContext *context = (ClientRequestContext *)temp;
94 --- 800,810 ----
95   ClientRequestContext::CheckNoCacheDone(int answer, void *data)
96   {
97       void *temp;
98 ! #ifndef PURIFY
99
100 !     bool valid =
101 ! #endif
102 !         cbdataReferenceValidDone(data, &temp);
103       /* acl NB calls cannot invalidate cbdata in the normal course of things */
104       assert (valid);
105       ClientRequestContext *context = (ClientRequestContext *)temp;
106 Index: squid3/src/comm.cc
107 diff -c squid3/src/comm.cc:1.388 squid3/src/comm.cc:1.389
108 *** squid3/src/comm.cc:1.388    Sat Aug 30 19:22:05 2003
109 --- squid3/src/comm.cc  Sat Sep  6 06:47:34 2003
110 ***************
111 *** 713,721 ****
112   
113       fill->amountDone += len;
114   
115 !     StoreIOBuffer *sb = &fdc_table[fd].fill.requestedData;
116
117 !     assert(fill->amountDone <= sb->length);
118   
119       comm_add_fill_callback(fd, fill->amountDone, COMM_OK, 0);
120   }
121 --- 713,719 ----
122   
123       fill->amountDone += len;
124   
125 !     assert(fill->amountDone <= fdc_table[fd].fill.requestedData.length);
126   
127       comm_add_fill_callback(fd, fill->amountDone, COMM_OK, 0);
128   }
129 Index: squid3/src/errorpage.cc
130 diff -c squid3/src/errorpage.cc:1.191 squid3/src/errorpage.cc:1.192
131 *** squid3/src/errorpage.cc:1.191       Sun Aug 31 21:49:38 2003
132 --- squid3/src/errorpage.cc     Sat Sep  6 06:47:35 2003
133 ***************
134 *** 344,351 ****
135   errorAppendEntry(StoreEntry * entry, ErrorState * err)
136   {
137       HttpReply *rep;
138 !     MemObject *mem = entry->mem_obj;
139 !     assert(mem != NULL);
140       assert (entry->isEmpty());
141   
142       if (entry->store_status != STORE_PENDING) {
143 --- 344,350 ----
144   errorAppendEntry(StoreEntry * entry, ErrorState * err)
145   {
146       HttpReply *rep;
147 !     assert(entry->mem_obj != NULL);
148       assert (entry->isEmpty());
149   
150       if (entry->store_status != STORE_PENDING) {
151 Index: squid3/src/peer_digest.cc
152 diff -c squid3/src/peer_digest.cc:1.99 squid3/src/peer_digest.cc:1.100
153 *** squid3/src/peer_digest.cc:1.99      Sun Aug 10 05:00:44 2003
154 --- squid3/src/peer_digest.cc   Sat Sep  6 06:47:35 2003
155 ***************
156 *** 400,411 ****
157   peerDigestHandleReply(void *data, StoreIOBuffer recievedData)
158   {
159       DigestFetchState *fetch = (DigestFetchState *)data;
160 -     PeerDigest *pd = fetch->pd;
161       int retsize = -1;
162       digest_read_state_t prevstate;
163       int newsize;
164   
165 !     assert(pd && recievedData.data);
166       /* The existing code assumes that the recieved pointer is
167        * where we asked the data to be put
168        */
169 --- 400,410 ----
170   peerDigestHandleReply(void *data, StoreIOBuffer recievedData)
171   {
172       DigestFetchState *fetch = (DigestFetchState *)data;
173       int retsize = -1;
174       digest_read_state_t prevstate;
175       int newsize;
176   
177 !     assert(fetch->pd && recievedData.data);
178       /* The existing code assumes that the recieved pointer is
179        * where we asked the data to be put
180        */
181 ***************
182 *** 649,657 ****
183   
184       if (size >= (ssize_t)StoreDigestCBlockSize) {
185           PeerDigest *pd = fetch->pd;
186 -         HttpReply const *rep = fetch->entry->getReply();
187   
188 !         assert(pd && rep);
189   
190           if (peerDigestSetCBlock(pd, buf)) {
191               /* XXX: soon we will have variable header size */
192 --- 648,655 ----
193   
194       if (size >= (ssize_t)StoreDigestCBlockSize) {
195           PeerDigest *pd = fetch->pd;
196   
197 !         assert(pd && fetch->entry->getReply());
198   
199           if (peerDigestSetCBlock(pd, buf)) {
200               /* XXX: soon we will have variable header size */
201 Index: squid3/src/stmem.cc
202 diff -c squid3/src/stmem.cc:1.80 squid3/src/stmem.cc:1.81
203 *** squid3/src/stmem.cc:1.80    Mon Aug  4 16:14:42 2003
204 --- squid3/src/stmem.cc Sat Sep  6 06:47:35 2003
205 ***************
206 *** 112,119 ****
207       assert (aNode->canAccept (location));
208   
209       /* these two can go I think */
210 !     size_t copyOffset = location - aNode->nodeBuffer.offset;
211 !     assert (copyOffset == aNode->nodeBuffer.length);
212       size_t copyLen = XMIN (amount, aNode->space());
213   
214       xmemcpy(aNode->nodeBuffer.data + aNode->nodeBuffer.length, source, copyLen);
215 --- 112,118 ----
216       assert (aNode->canAccept (location));
217   
218       /* these two can go I think */
219 !     assert (location - aNode->nodeBuffer.offset == aNode->nodeBuffer.length);
220       size_t copyLen = XMIN (amount, aNode->space());
221   
222       xmemcpy(aNode->nodeBuffer.data + aNode->nodeBuffer.length, source, copyLen);
223 Index: squid3/src/fs/diskd/store_io_diskd.cc
224 diff -c squid3/src/fs/diskd/store_io_diskd.cc:1.38 squid3/src/fs/diskd/store_io_diskd.cc:1.39
225 *** squid3/src/fs/diskd/store_io_diskd.cc:1.38  Sat Aug 23 06:33:04 2003
226 --- squid3/src/fs/diskd/store_io_diskd.cc       Sat Sep  6 06:47:36 2003
227 ***************
228 *** 334,341 ****
229   {
230       assert (ioRequestor.getRaw() != NULL);
231       off_t shm_offset;
232 !     char *rbuf = (char *)IO->shm.get(&shm_offset);
233 !     assert(rbuf);
234       ioAway();
235       int x = storeDiskdSend(_MQD_READ,
236                              IO,
237 --- 334,340 ----
238   {
239       assert (ioRequestor.getRaw() != NULL);
240       off_t shm_offset;
241 !     IO->shm.get(&shm_offset);
242       ioAway();
243       int x = storeDiskdSend(_MQD_READ,
244                              IO,
245 ***************
246 *** 691,697 ****
247       } else {
248           debug(79, 1) ("storeDiskdSend: msgsnd: %s\n", xstrerror());
249           cbdataReferenceDone(M.callback_data);
250 !         assert(++send_errors < 100);
251           IO->shm.put (shm_offset);
252       }
253   
254 --- 690,699 ----
255       } else {
256           debug(79, 1) ("storeDiskdSend: msgsnd: %s\n", xstrerror());
257           cbdataReferenceDone(M.callback_data);
258
259 !         if (++send_errors > 100)
260 !             fatal ("over 100 errors sending to the daemon - aborting\n");
261
262           IO->shm.put (shm_offset);
263       }
264   
265 ***************
266 *** 751,757 ****
267       } else {
268           debug(79, 1) ("storeDiskdSend: msgsnd: %s\n", xstrerror());
269           cbdataReferenceDone(M.callback_data);
270 !         assert(++send_errors < 100);
271       }
272   
273       /*
274 --- 753,761 ----
275       } else {
276           debug(79, 1) ("storeDiskdSend: msgsnd: %s\n", xstrerror());
277           cbdataReferenceDone(M.callback_data);
278
279 !         if (++send_errors > 100)
280 !             fatal ("over 100 errors sending to the daemon - aborting\n");
281       }
282   
283       /*
284 Index: squid3/src/repl/heap/store_repl_heap.cc
285 diff -c squid3/src/repl/heap/store_repl_heap.cc:1.13 squid3/src/repl/heap/store_repl_heap.cc:1.14
286 *** squid3/src/repl/heap/store_repl_heap.cc:1.13        Fri Feb 21 15:50:50 2003
287 --- squid3/src/repl/heap/store_repl_heap.cc     Sat Sep  6 06:47:36 2003
288 ***************
289 *** 298,304 ****
290       assert(heap->nwalkers);
291       assert(heap->count);
292       /* Ok, time to destroy this policy */
293 !     safe_free(policy->_data);
294       memset(policy, 0, sizeof(*policy));
295       cbdataFree(policy);
296   }
297 --- 298,304 ----
298       assert(heap->nwalkers);
299       assert(heap->count);
300       /* Ok, time to destroy this policy */
301 !     safe_free(heap);
302       memset(policy, 0, sizeof(*policy));
303       cbdataFree(policy);
304   }
305 Index: squid3/src/repl/lru/store_repl_lru.cc
306 diff -c squid3/src/repl/lru/store_repl_lru.cc:1.14 squid3/src/repl/lru/store_repl_lru.cc:1.15
307 *** squid3/src/repl/lru/store_repl_lru.cc:1.14  Fri Feb 21 15:50:50 2003
308 --- squid3/src/repl/lru/store_repl_lru.cc       Sat Sep  6 06:47:39 2003
309 ***************
310 *** 317,323 ****
311       assert(lru->nwalkers);
312       assert(lru->count);
313       /* Ok, time to destroy this policy */
314 !     safe_free(policy->_data);
315       memset(policy, 0, sizeof(*policy));
316       cbdataFree(policy);
317   }
318 --- 317,323 ----
319       assert(lru->nwalkers);
320       assert(lru->count);
321       /* Ok, time to destroy this policy */
322 !     safe_free(lru);
323       memset(policy, 0, sizeof(*policy));
324       cbdataFree(policy);
325   }
This page took 0.873507 seconds and 3 git commands to generate.