diff options
author | McCabe Maxsted | 2009-01-13 14:32:06 -0700 |
---|---|---|
committer | McCabe Maxsted | 2009-01-13 14:32:06 -0700 |
commit | ebcc41afb4ed80aa541bfe02909f2401dd0270fa (patch) | |
tree | 03514cdd0cc9d90c1c013a0cd7ef2cdde596e4d9 | |
parent | Updated changes to LLSD. (diff) | |
download | meta-impy-ebcc41afb4ed80aa541bfe02909f2401dd0270fa.zip meta-impy-ebcc41afb4ed80aa541bfe02909f2401dd0270fa.tar.gz meta-impy-ebcc41afb4ed80aa541bfe02909f2401dd0270fa.tar.bz2 meta-impy-ebcc41afb4ed80aa541bfe02909f2401dd0270fa.tar.xz |
Backported message timeout changes
-rw-r--r-- | ChangeLog.txt | 15 | ||||
-rw-r--r-- | linden/indra/llmessage/llurlrequest.cpp | 23 |
2 files changed, 30 insertions, 8 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt index daa386c..6879450 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt | |||
@@ -12,6 +12,15 @@ | |||
12 | * linden/indra/llinventory/llsaleinfo.cpp: | 12 | * linden/indra/llinventory/llsaleinfo.cpp: |
13 | Ditto. | 13 | Ditto. |
14 | 14 | ||
15 | * linden/indra/llmessage/llurlrequest.cpp: | ||
16 | Backported message timeout changes. | ||
17 | * linden/indra/llmessage/lliosocket.cpp: | ||
18 | Ditto. | ||
19 | * linden/indra/llmessage/llpumpio.cpp: | ||
20 | Ditto. | ||
21 | * linden/indra/llmessage/llpumpio.h: | ||
22 | Ditto. | ||
23 | |||
15 | * linden/indra/llmath/llcalc.cpp: | 24 | * linden/indra/llmath/llcalc.cpp: |
16 | Added cheat sheet help buttons in tools window. | 25 | Added cheat sheet help buttons in tools window. |
17 | * linden/indra/newview/llpanelface.cpp: | 26 | * linden/indra/newview/llpanelface.cpp: |
@@ -220,12 +229,6 @@ | |||
220 | Ditto. | 229 | Ditto. |
221 | * linden/indra/llinventory/llinventory.cpp: | 230 | * linden/indra/llinventory/llinventory.cpp: |
222 | Ditto. | 231 | Ditto. |
223 | * linden/indra/llmessage/lliosocket.cpp: | ||
224 | Ditto. | ||
225 | * linden/indra/llmessage/llpumpio.cpp: | ||
226 | Ditto. | ||
227 | * linden/indra/llmessage/llpumpio.h: | ||
228 | Ditto. | ||
229 | * linden/indra/newview/llinventorymodel.cpp: | 232 | * linden/indra/newview/llinventorymodel.cpp: |
230 | Ditto. | 233 | Ditto. |
231 | * linden/indra/newview/llinventorymodel.h: | 234 | * linden/indra/newview/llinventorymodel.h: |
diff --git a/linden/indra/llmessage/llurlrequest.cpp b/linden/indra/llmessage/llurlrequest.cpp index ee62798..e561597 100644 --- a/linden/indra/llmessage/llurlrequest.cpp +++ b/linden/indra/llmessage/llurlrequest.cpp | |||
@@ -68,6 +68,7 @@ public: | |||
68 | LLChannelDescriptors mChannels; | 68 | LLChannelDescriptors mChannels; |
69 | U8* mLastRead; | 69 | U8* mLastRead; |
70 | U32 mBodyLimit; | 70 | U32 mBodyLimit; |
71 | S32 mByteAccumulator; | ||
71 | bool mIsBodyLimitSet; | 72 | bool mIsBodyLimitSet; |
72 | }; | 73 | }; |
73 | 74 | ||
@@ -76,8 +77,8 @@ LLURLRequestDetail::LLURLRequestDetail() : | |||
76 | mResponseBuffer(NULL), | 77 | mResponseBuffer(NULL), |
77 | mLastRead(NULL), | 78 | mLastRead(NULL), |
78 | mBodyLimit(0), | 79 | mBodyLimit(0), |
80 | mByteAccumulator(0), | ||
79 | mIsBodyLimitSet(false) | 81 | mIsBodyLimitSet(false) |
80 | |||
81 | { | 82 | { |
82 | LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); | 83 | LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); |
83 | mCurlRequest = new LLCurlEasyRequest(); | 84 | mCurlRequest = new LLCurlEasyRequest(); |
@@ -264,8 +265,25 @@ LLIOPipe::EStatus LLURLRequest::process_impl( | |||
264 | { | 265 | { |
265 | CURLcode result; | 266 | CURLcode result; |
266 | bool newmsg = mDetail->mCurlRequest->getResult(&result); | 267 | bool newmsg = mDetail->mCurlRequest->getResult(&result); |
267 | if (!newmsg) | 268 | if(!newmsg) |
268 | { | 269 | { |
270 | // we're still waiting or prcessing, check how many | ||
271 | // bytes we have accumulated. | ||
272 | const S32 MIN_ACCUMULATION = 100000; | ||
273 | if(pump && (mDetail->mByteAccumulator > MIN_ACCUMULATION)) | ||
274 | { | ||
275 | // This is a pretty sloppy calculation, but this | ||
276 | // tries to make the gross assumption that if data | ||
277 | // is coming in at 56kb/s, then this transfer will | ||
278 | // probably succeed. So, if we're accumlated | ||
279 | // 100,000 bytes (MIN_ACCUMULATION) then let's | ||
280 | // give this client another 2s to complete. | ||
281 | const F32 TIMEOUT_ADJUSTMENT = 2.0f; | ||
282 | mDetail->mByteAccumulator = 0; | ||
283 | pump->adjustTimeoutSeconds(TIMEOUT_ADJUSTMENT); | ||
284 | } | ||
285 | |||
286 | // keep processing | ||
269 | break; | 287 | break; |
270 | } | 288 | } |
271 | 289 | ||
@@ -434,6 +452,7 @@ size_t LLURLRequest::downCallback( | |||
434 | req->mDetail->mChannels.out(), | 452 | req->mDetail->mChannels.out(), |
435 | (U8*)data, | 453 | (U8*)data, |
436 | bytes); | 454 | bytes); |
455 | req->mDetail->mByteAccumulator += bytes; | ||
437 | return bytes; | 456 | return bytes; |
438 | } | 457 | } |
439 | 458 | ||