summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/httprequest.cpp
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2012-06-11 17:47:04 -0400
committerMonty Brandenberg <monty@lindenlab.com>2012-06-11 17:47:04 -0400
commit267ab5b417eaef64a170d69ad83334df9d566ed9 (patch)
tree39b082be67c26ba6990c71f9265d222279030260 /indra/llcorehttp/httprequest.cpp
parent89187229dd630845177ecd7a16e2b9cb01dc47ce (diff)
Convert BufferArray interfaces to void * (not char *). HttpRequest::update() honor time limit.
Generally, opaque data operations are expected to be over 'void *' and have now converted interfaces to do that. Update() method honors millisecond limit to dwell time. Might want to homologate the millis/uSecs mix later....
Diffstat (limited to 'indra/llcorehttp/httprequest.cpp')
-rw-r--r--indra/llcorehttp/httprequest.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/indra/llcorehttp/httprequest.cpp b/indra/llcorehttp/httprequest.cpp
index baa0fe1a84..2f36168f8b 100644
--- a/indra/llcorehttp/httprequest.cpp
+++ b/indra/llcorehttp/httprequest.cpp
@@ -35,6 +35,8 @@
#include "_httpopsetpriority.h"
#include "_httpopcancel.h"
+#include "lltimer.h"
+
namespace
{
@@ -279,14 +281,9 @@ HttpHandle HttpRequest::requestSetPriority(HttpHandle request, priority_t priori
HttpStatus HttpRequest::update(long millis)
{
- HttpStatus status;
-
- // *FIXME: need timer stuff
- // long now(getNow());
- // long limit(now + millis);
-
+ const HttpTime limit(totalTime() + (1000 * HttpTime(millis)));
HttpOperation * op(NULL);
- while ((op = mReplyQueue->fetchOp()))
+ while (limit >= totalTime() && (op = mReplyQueue->fetchOp()))
{
// Process operation
op->visitNotifier(this);
@@ -295,7 +292,7 @@ HttpStatus HttpRequest::update(long millis)
op->release();
}
- return status;
+ return HttpStatus();
}