Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

...
Commits on Oct 29, 2010
Cody Cutrer Merge branch 'release/1.3' e0e07e8
Commits on Jan 27, 2011
Cody Cutrer Merge branch 'release/1.4' b2916a0
Commits on Mar 16, 2011
Russ Simons adds a callback to filter networks to use before connecting to a socket.
refs #28556

Change-Id: Ibc0136e5757ccf8d30e4d657ec47978d7ff5c189
Reviewed-on: https://gerrit.dechocorp.com/17260
Reviewed-by: Cody Cutrer <cody@mozy.com>
7e09054
Commits on Mar 18, 2011
Cody Cutrer Appease g++ 4.5.
Change-Id: Id3c2a6c684425da50c518eeb8ddea66d8643dc35
Reviewed-on: https://gerrit.dechocorp.com/17364
Reviewed-by: Cody Cutrer <cody@mozy.com>
bab8fc3
Commits on Mar 29, 2011
Cody Cutrer Fix for URI::QueryString when inserting out-of-order
Change-Id: I0b2b2fc130038568f44f4eb33c19846baaa30f71
Reviewed-on: https://gerrit.dechocorp.com/17638
Reviewed-by: Jacob Fugal <jacob@mozy.com>
ab85e15
Commits on Apr 06, 2011
Cody Cutrer Fix MORDOR_MAIN for use *without* "using namespace Mordor" e4e5cf9
Matt Billenstein Defines for mips
(cherry picked from commit ded7953)
d00c1fe
Matt Billenstein .gitignore examples/simpleappserver
(cherry picked from commit 1962b32)
701d62a
Matt Billenstein Daemonize if --daemonize is given on the command line
instead of requiring the use of the config parser

(cherry picked from commit d12cfb0)
036d24d
Cody Cutrer Handle ERROR_BUFFER_OVERFLOW in Address:getInterfaceAddresses
Thanks to @wjjensen
46d2e02
Commits on Apr 09, 2011
Cody Cutrer Add callback for CData in XML Parser 12174a5
Cody Cutrer Helper functions for HTTP Requests with simple bodies. add4f19
Commits on Apr 14, 2011
Cody Cutrer Add simpleclient to Makefile 8a856a8
Cody Cutrer Directly pass the requestStream to QueryString for parsing d6c41ac
Cody Cutrer Allow respondError to not overwrite the ContentType 9531b80
Commits on Apr 18, 2011
Russ Simons Fixed possible crash when instantiating a TempStream
fixes #39712 - We were erroneously using the retValue
of GetTempFileName as the new string length. This
could cause excessive truncation of the temp filename.

Change-Id: Ia90c725a3aba05833312a2ad164e9bc4b331eabf
Reviewed-on: https://gerrit.dechocorp.com/18208
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
14aa625
Jeremy Stanley make log-censoring customizeable with static setLogFilter
the default implementation hides Basic auth credentials, as before,
but you can derive from this to hide other information from logged
HTTP requests on an application-specific basis

Change-Id: I00c112f4cfcf92f5ddb492cda1cd68453e0d29d7
Reviewed-on: https://gerrit.dechocorp.com/18252
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Russ Simons <russs@mozy.com>
c7a6b76
Commits on Apr 20, 2011
BJ Homer Use $BOOST_ROOT instead of hard-coding /usr/local/
Change-Id: I002fade928024cda98580173444a4f8684c03e3c
Reviewed-on: https://gerrit.dechocorp.com/18338
Reviewed-by: David Brown <davidb@mozy.com>
1a529d9
Commits on May 03, 2011
BJ Homer Switch to Clang, and do some projfile cleanup.
Change-Id: I981a299bbc3284476dc33c114ee3db844e5b38a1
Reviewed-on: https://gerrit.dechocorp.com/18771
Reviewed-by: Ben Dolman <bend@mozy.com>
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
0774eb2
Commits on May 04, 2011
Cody Cutrer Comparison operators for HTTP::MediaType f7e8987
Commits on May 10, 2011
Wilson Pan Fix hang up issue in IOManager epoll
Signed-off-by: Wilson Pan <weiminp@mozy.com>
Change-Id: I9ddc617daf79d34b498ba5f15df0f8d41a3723d6
Reviewed-on: https://gerrit.dechocorp.com/18999
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
8e89c06
Commits on May 11, 2011
Wilson Pan Fix seg fault found in trodor
Signed-off-by: Wilson Pan <weiminp@mozy.com>
Change-Id: I0c22eff451dfb07f73cfc2cf764183cc1de10739
Reviewed-on: https://gerrit.dechocorp.com/19069
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
1c5e534
Commits on May 17, 2011
Ben Dolman Do not create proxies from empty strings.
Change-Id: Icb22822d4a4b2dfda5c7ba876d91758c7148fa6e
Reviewed-on: https://gerrit.dechocorp.com/19331
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
9575c6a
Commits on May 18, 2011
Cody Cutrer map from column indexes to column names bc7204b
Andrew Skowronski andrewsk Documentation for ConfigVars
ConfigVars are useful but I found the API hard to figure out
without some explanation, and I think other people have also faced
similar confusion.

e.g. whats going on with the 2 Lookup methods?
Why does the environmental variable LOG_STDOUT magically correspond
to "log.stdout"?

This fix adds a summary comment and also comments a few methods.

Change-Id: I01d3afdeebb5d50504fa08bf52c51652fcb33542
Reviewed-on: https://gerrit.dechocorp.com/19362
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
67c78bb
Commits on May 20, 2011
Jeremy Stanley avoid overflow when converting time to microseconds
this overflow causes now() to jump backward, leaving behind
timers scheduled for the distant future, or possibly never

expose muldiv64() function in util.h, and add unit tests

Change-Id: Ied4415e61bd565526c97fe3e3c14ca794896f305
Reviewed-on: https://gerrit.dechocorp.com/19424
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
887a5de
Commits on May 23, 2011
Jeremy Stanley expire all timers if the "monotonic" clock goes backward >5 s
to prevent lost timers (and thus effective deadlock) when the
performance counter rolls over (should be very rare, since it's
a 64-bit counter), or if a buggy clock implementation returns
erratic results.

also, make TimerManager's clock source user-replaceable, and
implement a unit test covering this scenario

Change-Id: I40e8cdb63974192c3c685d123c31f9371ad587bc
Reviewed-on: https://gerrit.dechocorp.com/19468
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Russ Simons <russs@mozy.com>
18708fd
Commits on May 26, 2011
Wilson Pan Fix assert failure in buffer and deadlock while triggering read event…
… in iomanager_epoll

Signed-off-by: Wilson Pan <weiminp@mozy.com>
Change-Id: I5a98cef93edc18974b618ceebc217c07270461cc
Reviewed-on: https://gerrit.dechocorp.com/19567
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
79c2274
Cody Cutrer virtual destructor to appease gcc 00da287
Commits on May 27, 2011
Jeremy Stanley avoid possible deadlock when shutting down the ConnectionCache
Change-Id: Ide6bca0426821e42baf3de84ddf8ef162abaf8eb
Reviewed-on: https://gerrit.dechocorp.com/19700
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
e373646
Commits on May 31, 2011
Cody Cutrer Only define BSD if not already defined
This is a workaround for mozy#13. I
really need to move to using autoconf's macros, rather than these
primitive OS checks.
b4448bf
Cody Cutrer virtual *destructor* 44a716a
Commits on Jun 01, 2011
Cody Cutrer Revert "Fix hang up issue in IOManager epoll"
This reverts commit 8e89c06.
8d39547
Cody Cutrer Revert "Fix assert failure in buffer and deadlock while triggering re…
…ad event in iomanager_epoll"

This reverts commit 79c2274.
a8fcdff
Cody Cutrer Use a member variable rather than a global for keeping track of timer…
… rollover
c020d38
Cody Cutrer fix tickle delivery for epoll
Don't use edge triggered mode for the tickle pipe, otherwise tickles
might pile up and we'll block in epoll_wait without getting notified.

Do this rather than using non-blocking mode, since in non-blocking
mode we might consume tickles intended for other threads.
9ee80d4
Cody Cutrer Merge remote branch 'mozy/next' into next
With a few reverts for "bad" commits (breaking functionality), a
commit to improve the rollover detection, and a commit that fixes
one of the reverted commits in a better way.
bf53656
Cody Cutrer hush, gcc 0dc487a
Jeremy Stanley turn off a Logger before destroying it
to avoid crashes if a LogSink's destructor indirectly tries to
log something (e.g., ~FileLogSink() calls ~HandleStream(), which
writes to the trace log)

Change-Id: I34e3fa72c944a898843929ae911ecb9e6b1ff5a1
Reviewed-on: https://gerrit.dechocorp.com/19855
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
e3471f1
Jeremy Stanley track overflow per TimerManager instance
so *all* TimerManagers detect overflow, not just one

Change-Id: Ib5dbcf182d7c99970461bf97e509b83012375805
Reviewed-on: https://gerrit.dechocorp.com/19897
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
70f81b9
Cody Cutrer Merge remote branch 'mozy/next' into next 763a001
Commits on Jun 02, 2011
Wilson Pan Fix IPv4 address '<' operator error
Signed-off-by: Wilson Pan <weiminp@mozy.com>
Change-Id: I536fd4c44d7e0d2795ec2fff3796e241c2ac995f
Reviewed-on: https://gerrit.dechocorp.com/19835
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
297a0f0
Kevin Cai kevincai fix memory leak in HTTPClient test
* add one more valgrind suppression in linux.supp
* conditional compile HTTPClient::failWhileFlushOtherWaiting which
  causes valgrind crash
* fix shared_ptr reference cycle in
  HTTPClient::failWhileRequestingOtherWaiting

Change-Id: I8980ef514fcb3339ac12e102f035e5a2235cf31f
Signed-off-by: Kevin Cai <kevinc@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/19894
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
9adba5e
Steven Schmidt Adding the object compoundlistener to the mordor xcode project
This fixes a temperary workaround that andrew had implimented
earlier, since the compoundlistener object wasn't visible in
OSX before we added it to the xcode project.

fixes #703

Change-Id: I9ac5340e1c84ae4253c52ad8cd11ef1ddeb77143
Reviewed-on: https://gerrit.dechocorp.com/19991
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
73ccf5a
Commits on Jun 13, 2011
Alexandre Bique abique Fixing warnings on Linux/gcc 4.6. b35273a
Commits on Jun 14, 2011
Cody Cutrer always include optional library headers
Fixes make dist and make install
dc49ab1
Commits on Jun 15, 2011
Jeremy Stanley fix PriorConnectionFailedException not getting retried
RetryRequestBroker was retrying if the exception source was HTTP,
but in this case it's going to be CONNECTION, so we should look
for that too, like we do for SocketException

Change-Id: Iede1d7c27d020dc81c459f22783ce18991665f26
Reviewed-on: https://gerrit.dechocorp.com/20398
Reviewed-by: Russ Simons <russs@mozy.com>
084b70a
Commits on Jun 20, 2011
Cody Cutrer Merge remote branch 'babali/next' into next 7aaf0d5
Commits on Jun 21, 2011
Cody Cutrer Native anonymous pipe function ab68bf2
Cody Cutrer fix IOManagerEpoll multi-threaded race condition
IOManagerEpoll was scheduling events before deregistering from epoll,
so it was possible another thread could close the fd before the
deregistration happened, causing the IOManagerEPoll::idle to throw
an exception and essentially crash the process.
04cf507
Cody Cutrer fix HTTPServer::ifMatch incorrectly resetting ETag 4d1aa5d
Commits on Jun 22, 2011
Russ Simons Added logging of Proxy errors
fixes #41645

Change-Id: I89d8771f2e643882cb3c032b2795fbfbd0ead7ed
Reviewed-on: https://gerrit.dechocorp.com/20593
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
Reviewed-by: Dan Nuffer <dann@mozy.com>
655a067
Commits on Jun 23, 2011
Alexandre Bique abique predef.h: indentation of #if #else #endif; replaced #ifdef LINUX by #…
…ifdef _GNU_SOURCE
1184d20
Cody Cutrer Merge pull request #4 from babali/next
Next
5990ca0
Commits on Jun 26, 2011
Cody Cutrer fix assertion/crash with full duplex use of BufferedStream 20103a6
Commits on Jun 27, 2011
Cody Cutrer fix regression with IOManagerEpoll d2b6f18
Cody Cutrer make FDStreams cancellable (pipes) d32e519
Cody Cutrer fix deadlock in IOManagerEPoll
When one thread would get the event, it would schedule the fiber, and
another thread would run it.  The fiber would then immediately exit,
and when the triggering thread attempted to remove its reference to the
fiber, a destructor would fire (bound up in the fiber start routine)
that would then call cancelEvent on the same fd that triggered the event;
cancelEvent would then try to grab the mutex, and deadlock.

Unfortunately, I was not able to reproduce this with a unit test.  I
was only able to repro by manually inserting a sleep after scheduling,
but before releasing the fiber reference.
7b7ab56
Cody Cutrer log a warning when ssl tries to close gracefully, but receives more data
fixes mozy github issue #14
1c6a39f
Commits on Jun 28, 2011
Cody Cutrer automatically detect valgrind (compile time and run time)
 * Just use AC_CHECK_HEADERS for detecting valgrind/valgrind.h
   instead of forcing the user to pass --with-valgrind
 * rename config.h from autoconf to autoconfig.h to avoid conflicts
   with mordor/config.h
 * Use HAVE_VALGRIND_VALGRIND_H from autoconf rather than manual
   HAVE_VALGRIND to enable valgrind client requests
 * For unit test that crashes valgrind, still compile it in, just
   skip it if running under valgrind
8d388e6
Cody Cutrer Merge commit 'mozy/next' into next e4a5cac
Andrew Skowronski andrewsk Adding comments to Broker and HTTP interfaces
Mordor has a very useful HTTP library, but it tends to require
a complete knowledge of the code and HTTP spec/terminology to
make even a simple client request.  So far I had always just
cut and paste existing mordor code and then tried to adapt it
blindly but it was usually a recipe for frustation.

As part of my code jam time I've done a study of part of the
code and added more comments.  I tried to only document things
that I'm confident about, but please review, as a bad comment
can be more misleading than no comment at all.

http.h - Try to establish the relationship between the structures
there and the actual HTTP headers that the client and server
need to pass over the wire.

BTW it seems to be an oversight that there is no direct
Cookie support?  I added a comment with the workaround

uri.h - Maybe I'm the only dev unfamiliar with all the detailed
terminology for the parts of an URI, but I thought a few
examples would clarify what scheme, authority and fragment mean.
Also I found it is not clear how to properly build a query for an
URI, and there is a risk of accidental double encoding/decoding
if you don't ues it right.  So I put some specific tips on that
subject.

broker.h - RequestBrokers are a critical part of making a connection
but the abstraction and flexibility also makes it a bit obscure.
Another challenge is the fact that this header file exposes all sorts
of details that a normal user of the library wouldn't need to know.
This is a first pass at describing each class and some of the important
methods, with some emphasis on the ConnnectionCache.  (Note:
now that I understand it a bit better I think this code is very cool)

Change-Id: If90f1f571248d03392894b16e3208f01d3eebc92
Reviewed-on: https://gerrit.dechocorp.com/20605
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
Reviewed-by: Dan Nuffer <dann@mozy.com>
61c79f9
Commits on Jul 05, 2011
Ben Dolman Fix crash when proxying with PAC scripts on Mac.
The call to evaluate a PAC script was crashing in the underlying
JavaScript VM:

JSC::Heap::markConservatively(JSC::MarkStack&, void*, void*)

The JS garbage collector does not work properly on a fiber-based thread,
so the solution was to isolate the call into a fiber-free thread. The
worker thread utilizes a message queue to communicate with the
requesting fiber-based thread. The fiber uses Mordor::sleep while
waiting to allow other fibers to continue.

Change-Id: If6a661bce5b320ed518f5183767ce8d7d1df31ef
Reviewed-on: https://gerrit.dechocorp.com/20915
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
edf923d
Commits on Jul 11, 2011
Andrew Skowronski andrewsk Avoid auto proxy detection on each http request
The ProxyCache is typically used on every single http
request to look up the proxy rules for each url.
However autodetection has been found to take 15-30 seconds
to fail on some of our computers, which makes sync
completely unusable.

Autodetection is controlled in the Internet Options in Control
panel but the option is hard to find and seems to be on by default
on some machines.  So a fix in Mordor also seemed prudent.

Rather than always calling WinHttpGetProxyForUrl this fix now
calls the more explicit WinHttpDetectAutoProxyConfigUrl to perform
the autodetection.  If that fails it does not attempt again during the
lifetype of the ProxyCache, which for Kalypso and Sync is
the same as the lifetime of the RequestBroker.

The downside of this extra caching is the client needs to do
extra work to reset the cache if the network configuration changes.
e.g. if you move your laptop to a corporate network then an existing
RequestBroker would not pick up the need for a proxy unless
ProxyCache::resetDetectionResultCache is called.

fixes #790 (https://labs.dechocorp.com/issues/790)

Change-Id: I962e0fde6c5e54d812379662e38caf34b213684c
Reviewed-on: https://gerrit.dechocorp.com/21069
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
edbb9f4
Andrew Skowronski andrewsk Update .gitignore for xcode4
Ignore autogenerated xcuserdata

Change-Id: I8bc91093bee4b314d578c987756d88880a3e1357
Reviewed-on: https://gerrit.dechocorp.com/21156
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Ben Dolman <bend@mozy.com>
c9e6639
Commits on Jul 12, 2011
Wilson Pan Init for IPv4Address
Signed-off-by: Wilson Pan <weiminp@mozy.com>
Change-Id: I7750a67a9559ffcacbd6042ac536bb7b19f0b61e
Reviewed-on: https://gerrit.dechocorp.com/21201
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Kevin Cai <kevinc@mozy.com>
11bca67
Commits on Jul 18, 2011
Andrew Skowronski andrewsk Fix random vc9 compilation failures
Use a separate output directory for each example
so they don't get sharing violations during parallel compilation.
Similar to tethys fix gerrit/21168

Change-Id: Ie9dec6f55dcfada4d07e0e02eadd2abaf99bc110
Reviewed-on: https://gerrit.dechocorp.com/21400
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
394cbce
Commits on Jul 19, 2011
Dannis Song make preparedstatement support using text as result format
current format is BINARY only. However this may not suit every situation.
A typical scenario is this:
when calling a stored procedure which returns void, the result format has to be TEXT.
A fatal_error will be returned if the result format is BINARY.

There are a couple of stored procedures in demeter returning void. So this is kind of
a blocker to trogdor, which uses mordor to access demeter.

with this patch, BINARY is still the default format. While you can call
conn->prepare("...", "", PreparedStatement::TEXT) to specify the result format.

Signed-off-by: Dannis Song <danniss@mozy.com>
Change-Id: I22d49ef5e67ab946b82092c2146ff541b4c9576d
Reviewed-on: https://gerrit.dechocorp.com/21430
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Wilson <weiminp@mozy.com>
9f1b71d
Andrew Skowronski andrewsk Fix Mordor XML parser for attribute values
Parser was crashing if attribute value contained
references, e.g. &quot; or &apos;
For example a="&quot;" or b='&apos;' (but a="'" is legal xml)

The existing regular expression seemed to being trying
to call a separate callback for each reference, as is done
for the inner text.  I was not able to fix that and in any
case it would be problematic for a parser to handle the
same callback invoked for both building inner text and
attribute values without more context info.
Instead I demonstrate in the unit test
how the attribute value callback could take care of converting
any references itself.

I also added a bit more general unit testing.  I found that comments
are not supported, but fixing that is beyond my ragel skills so
i just leave a unit test as a reminder.

Change-Id: I7c5f735269eabf6b80a123c6f3e0ff746713e180
Change-Id: Iec17341a32858c3d86b78140bc2c20383ed5c00f
Reviewed-on: https://gerrit.dechocorp.com/21366
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
Reviewed-by: Rodi Reich <rodir@mozy.com>
62a7786
Commits on Jul 20, 2011
Niels Werensteijn Merge commit 'upstream/master' into next 4e156cd
Cody Cutrer always include optional library headers
Fixes make dist and make install
fcfd2ad
Commits on Jul 21, 2011
Kevin Cai kevincai add TimerManager::registerConditionTimer() interface
Problem statement:
* Client has to be very carefully using the timer, has to remember to
  cancel the time in destructor combining with exception handling
* Under current implementation, Timer object is not 100% cancellable
  after the timer enters the expiring queue
* So there are a bit possiblity that when timer is timed out and the
  callback is executed, the dependent objects are already destroyed
  (Especially, using class member function as the timer callback, and
  the object itself is detroyed, so the 'this' point is invalid)

Sulotion:
* Leverage weak_ptr to detect expired 'this' object

Implementation:
* registerConditonTimer interface is added

Limitation:
* By using weak_ptr, the timer can't be registered in object constructor

Change-Id: I50b91be01a68bdeea1b71d2227cc56c92b073012
Signed-off-by: Kevin Cai <kevinc@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/21354
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
c3184be
Niels Werensteijn -added SHA256Stream 7dde718
Niels Werensteijn -added sha256 to string c4ffaef
Commits on Jul 22, 2011
Niels Werensteijn -Only use SHA256 things when it's available on openssl 81c8203
Commits on Jul 26, 2011
Andrew Skowronski andrewsk ClientRequest throw rather than assert
TritonClient was attempting to flush requestStream in its
error handling.  If the stream is in an error state then
just throw again, following similar logic to other methods
in ClientRequest.

Note: when the assert was ignored, e.g. in release build,
the eventual flush() call would end up throwing a
ConnectionAbortedException from the socket library.
So an alternative fix would be to adjust the assert and
let the error case proceed along its old code path.

Reference:
https://labs.dechocorp.com/issues/816

Change-Id: I75b69274828d535cc6012e4da4c9d985a3190b98
Reviewed-on: https://gerrit.dechocorp.com/21692
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
6c35ecd
Commits on Jul 29, 2011
Kefu Chai tchaikov add hmac-sha256
Change-Id: I4bcff0a4f0534acb58b8a9721eeaa6cea63827c4
Signed-off-by: Kefu Chai <chaik@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/21783
Reviewed-by: Kevin Cai <kevinc@mozy.com>
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
58318c4
Commits on Aug 01, 2011
Jeremy Stanley add configvars to disable use of ConnectEx and AcceptEx on win32
as these functions are often broken by buggy third-party
Layered Service Providers (LPSs).

also fix a few bugs in the fallback paths, and make the
Socket::accept(Socket &) function private, since it has
never worked (there's no way to construct a Socket with
m_sock == -1 without using the private ctor that
Socket::accept() makes use of)
Change-Id: Ib6c830c05ce7a6e031e240852615d7b5c750674e
Reviewed-on: https://gerrit.dechocorp.com/21925
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
ebdd510
Commits on Aug 03, 2011
Cody Cutrer associate[PQ]ConnectionPoolWithConfigVar helper bb6e62c
Commits on Aug 10, 2011
Cody Cutrer don't hide overloaded function
(thanks clang from Xcode 4.1)
001f599
Cody Cutrer more fixes courtesy of clangs amazing warnings 5c5bb69
Commits on Aug 12, 2011
Cody Cutrer add setsockopt logging 3dadc7b
Commits on Aug 13, 2011
Cody Cutrer write a pidfile when daemonizing 21117d1
Commits on Aug 18, 2011
Kevin Cai kevincai respondStream() tolerant with 0-size stream
* with a zero-size stream, ServerRequest::responseDone will be called
  twice, first for notifyOnEof(), second for notifyOnClose() which will
  cause the same ServerRequest been commit twice which crashes the
  ServerConnection.
* Fix it by checking the response stream size, DO NOT transferStream to
  responseStream() if size is zero.

Change-Id: I3cbe631b198e4dd5c76d3cf0cc81c283f3a0d393
Signed-off-by: Kevin Cai <kevinc@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/22552
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Dannis Song <danniss@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
Reviewed-by: Russ Simons <russs@mozy.com>
760073e
Commits on Aug 22, 2011
Jeremy Stanley don't crash on SSL_ERROR_SYSCALL
If
 * the original API returns -1
 * SSL_get_error() returns SSL_ERROR_SYSCALL
 * the SSL error queue is empty (!hasOpenSSLError())
then it means the underlying BIO has failed, and the system
error code should be set.

Rather than doing MORDOR_NOTREACHED (which will terminate
the application), throw an exception with the last-error code.

Change-Id: I7b3840303b911e04ae7fcfa48beabbf40f56c023
Reviewed-on: https://gerrit.dechocorp.com/22791
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
c74af98
Commits on Aug 24, 2011
Kevin Cai kevincai add context() interface in HTTP::ServerRequest
* context() interface added so that when HttpServlet handles
  ServerRequest, servlet can get consistent request context

Change-Id: I2057e3fd0f3446d3eb825a68eb58430cc3f64653
Signed-off-by: Kevin Cai <kevinc@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/22822
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
32b5426
Josh Orr Adds action for unquoting parameter attribute name/key. refs #43712
Change-Id: I6ee7bbb999ace9fdfd76270757809e7a87c6f000
Reviewed-on: https://gerrit.dechocorp.com/22910
Reviewed-by: David Brown <davidb@mozy.com>
62219bd
Commits on Aug 31, 2011
Dan Nuffer Fix a fiber leak
refs #34767
Fiber::exitPoint() never returns, so destructors won't run.
Call outer.reset() to avoid a leak.

Change-Id: I221824b146601dcc50dddd47899e1c802c12cb9f
Reviewed-on: https://gerrit.dechocorp.com/23189
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
cb5f634
Commits on Sep 06, 2011
Kevin Cai kevincai add merge() interface to Mordor::Statistic
* merge() interface allow library client to do arithmetic add operation
  to the same statistic type

Signed-off-by: Kevin Cai <kevinc@mozy.com>
Change-Id: I40108c08c02719dd6fa978f8a4c928c56ceb9807
Reviewed-on: https://gerrit.dechocorp.com/23378
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Wen Zhao <wenz@mozy.com>
feb7efe
Commits on Sep 16, 2011
Cody Cutrer fix gcc warnings with -O0 on natty 332eb15
Commits on Sep 17, 2011
Cody Cutrer Revert "Adds action for unquoting parameter attribute name/key. refs …
…#43712"

This reverts commit 62219bd.
ceab1c7
Cody Cutrer Revert "add configvars to disable use of ConnectEx and AcceptEx on wi…
…n32"

This reverts commit ebdd510.
a948bb3
Cody Cutrer fix bugs in windows non-IOCP connect codepath
also make one form of accept private.

See ebdd510
be5a5a1
Cody Cutrer add configvars to disable use of ConnectEx and AcceptEx on win32
as these funcations are often broken by buggy third-party
Layered Service Providers (LSPs)

See ebdd510, however, don't use
boost::call_once, because it is notoriously slow.
d3742f5
Cody Cutrer Merge 'mozy/next' into next
Conflicts:
	mordor/streams/ssl.cpp
44a39f1
Cody Cutrer disable test that can't run on windows yet 9df99f1
Cody Cutrer dos2unix 4ec6e68
Cody Cutrer Merge commit 'mepahoo/next' into next 489c5d8
Commits on Sep 18, 2011
Cody Cutrer fix daemonizing from init script run with sudo bfc1a40
Commits on Sep 20, 2011
Lance Helsten Addition of crypto.h and crypto.cpp to mordor project.
Change-Id: Ib00b0b493a75933e147e49e6e72baf437d72d7fe
Reviewed-on: https://gerrit.dechocorp.com/24024
Reviewed-by: David Brown <davidb@mozy.com>
103ce58
Commits on Sep 24, 2011
Kevin Cai kevincai fix ThroughputStatistic typo
* from ThroughputStatistic::update() function, it can be concluded that
  the time statistic should be defined as AverageMinMaxStatistic<U>

Change-Id: Ib36cf82c1bc9992eec292b29e662362364e92db7
Signed-off-by: Kevin Cai <kevinc@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/24175
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
0093df3
Commits on Sep 29, 2011
Henry CHEN kalyspo #43532: avoid detect invalid proxy over and over again
Originally we added some code to avoid auto proxy detection but only fix
some of call stacks of func autoDetectProxy(). But there are other paths
which detect invalid proxy again even it fails earlier.

Now I put more fix within func autoDetetProxy() so that if one proxy is invalid,
we don't detect it again unless resetDetectionResultCache() is called (usually
by network connection detection thread, or nlathread).

I change the resetDetectionResultCache() to static func so it's easier to reset
invalidProxy list.

Patch Set 3:
update patch based on Andrew's comment.

Signed-off-by: Henry CHEN <henryc@mozy.com>
Change-Id: Ia18e489c5b5141e40f9dca03fd5a1c7fd0b22b8a
Reviewed-on: https://gerrit.dechocorp.com/23718
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
Reviewed-by: Russ Simons <russs@mozy.com>
704a62c
Commits on Oct 04, 2011
Josh Orr Support for XCode 4.2
Change-Id: Ib941abe985c9e76aef1c0ab659ca37edf017bfa5
Reviewed-on: https://gerrit.dechocorp.com/24535
Reviewed-by: Lance Helsten <lanceh@mozy.com>
a820a08
Commits on Oct 12, 2011
Andrew Skowronski andrewsk Support persistent connection via http 1.0 proxy
Needed for pipelining of requests.  Was observed on the
Vmware proxy by Rodi Reich.

refs https://labs.dechocorp.com/issues/878

Change-Id: I7d92303d010f68d3833439acc36bd519f2aa9409
Reviewed-on: https://gerrit.dechocorp.com/24644
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
8527937
Commits on Oct 25, 2011
Zhaoding fixes #45138 - Support OAuth2.0 in mordor
Added a request broker for OAuth2.0.

Change-Id: I726d83f90286c8048ad956c60ccdfc43e239ecb5
Reviewed-on: https://gerrit.dechocorp.com/25136
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Russ Simons <russs@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
Reviewed-by: Henry Chen <henryc@mozy.com>
4d95ac9
Zhaoding Add oauth2.h/cpp to mordor.vcproj/vcxproj.
Change-Id: I912dfd0d2ef6c59d0a385da6cf57e63ac0cdd7e1
Reviewed-on: https://gerrit.dechocorp.com/25232
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Henry Chen <henryc@mozy.com>
23bb147
Jeremy Stanley fix for ragel failure to resolve "../uri.rl"
seems like ragel on windows will only _sometimes_ try to resolve
include paths relative to the source file being compiled.  help
it out a bit in this specific case by explicitly marking
mordor/http as an include directory, so it will attempt
mordor/http/../uri.rl and find the include there.

Change-Id: I5acae003ccacd52a1575bcf14e901d5d04357923
Reviewed-on: https://gerrit.dechocorp.com/25258
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
ddd6354
Commits on Nov 03, 2011
Jeremy Stanley allow custom logging of HTTP::Request and Response
instead of merely filtering, applications can perform their
own logging of Requests and Responses - or choose whether
to log based on URI, etc.

Change-Id: I8cbf61df071a12b5ab35a601432fdad66c349fab
Reviewed-on: https://gerrit.dechocorp.com/25578
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
2b80e45
Commits on Nov 17, 2011
Kevin Cai kevincai Fix BufferedStream r/w thread-safe for seekless parent stream
* BufferedStream removes read-write thread-safe ability even the parent
  stream is read-write thread-safe, this change partially fixes the
  issue by make the r/w thread-safe when parent stream is seekless.
* 3 new unit tests is added to exposes the problem, (disabled one)

Change-Id: I38481e7f784027a58b3196b5150f5ff323d980e3
Signed-off-by: Kevin Cai <kcai@vmware.com>
Reviewed-on: https://gerrit.dechocorp.com/26121
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
12a7b51
Commits on Nov 18, 2011
Kevin Cai kevincai refs #42355, pass size parameter while responding size-able stream
* If source stream supports size(), pass the size to transferStream when
  tranferring to respondStream. In this way if something wrong happens
  in source stream, tranferStream() will detect the stream is half
  tranferred. Otherwise, tranferStream() won't know the error and
  targetStream (NotifyStream) close will trigger assertion failure in
  ServerRequest::responseDone()

Change-Id: Ic9e2783c80d6af9742b228abf2b9b9f8d845f962
Signed-off-by: Kevin Cai <kcai@vmware.com>
Reviewed-on: https://gerrit.dechocorp.com/26167
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
9b38b66
Commits on Nov 22, 2011
Andrew Skowronski andrewsk Track maximum fiber count as mordor statistic
Too many fibers can result in crash, so track the
maximum number fiber objects created at a time

refs - https://labs.dechocorp.com/issues/839

Change-Id: I51e82168608436d9f0cdd086ae3589d75688b9bc
Reviewed-on: https://gerrit.dechocorp.com/26196
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
4bc24d6
Commits on Nov 23, 2011
Henry CHEN see #44076: auto create TempDir if it doesn't exist
When TempDir doesn't exist, GetTempFileName just fails. In this case, we
try auto-create TempDir and try again. If it still fails, raise MORDOR exception.

Patch Set 4:
change to use wstring::c_str() per Andrew's suggestion.

Signed-off-by: Henry CHEN <henryc@mozy.com>
Change-Id: Iad889ed93055d2734c519e5c0be8dd6b3a8489ee
Reviewed-on: https://gerrit.dechocorp.com/26168
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
Reviewed-by: Russ Simons <russs@mozy.com>
9dccd7f
Commits on Nov 24, 2011
Kevin Cai kevincai make Scheduler batch running exception-safe
Problem:
There are two problems in Scheduler::run() regarding to exception
throwed in batch Fiber:
1. When the exception throws, m_activeThreadCount is not decreased. This
  will cause the Scheduler stop() never exits, it handing in idle()
  waiting for the dead non-exist activeThread due to incorrect
  m_activeThreadCount
2. When batchSize > 1, as the exception throws, those fibers left in
  batch are not returned to m_fibers, which means these fibers are
  LOST. Scheduler should put the un-executed fibers back to m_fibers for
  re-scheduling.

Change-Id: I8628d480e4bd768f89fbd586b0941eca48ab36a1
Signed-off-by: Kevin Cai <kcai@vmware.com>
Reviewed-on: https://gerrit.dechocorp.com/26344
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
bcc4449
Kevin Cai kevincai fixes the issue that IOManager hold expired Timers' resource too long
* While processTimer() in IOManager, the expired Timers' functors are
  saved in 'expired' vector, these functors will not be destructed
  until the expired variable is reset or cleared. This will make
  timer Client wait longer than expected even the timer is excuted,
  but the resource is not released. In case there are shared_ptr
  binding in functors, the object will be lived longer than expected.
* Fix the problem by clear the expired variable once the functors are
  scheduled into Scheduler.

Change-Id: I5c42e4edccf48510da6985854d3c119376b3d4fe
Signed-off-by: Kevin Cai <kcai@vmware.com>
Reviewed-on: https://gerrit.dechocorp.com/26348
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
fb20652
Commits on Dec 07, 2011
Xiangdong Lin Add two public methods for Scheduler
Add methods threads() and rootThreadId() for Scheduler to expose threads
info to outside world.

Signed-off-by: Xiangdong Lin <xiangdongl@mozy.com>
Change-Id: Ifc51a132433c0c120ee45d7b16bfa0ac6592a08a
Reviewed-on: https://gerrit.dechocorp.com/26665
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
Reviewed-by: Kevin Cai <kcai@vmware.com>
ec27d87
pancho tfixes #45879 Refactor the socket code to resemble 2.8 code
These changes seem to fix the problem with the socket hanging when we run under panda.
We are waiting to hear from panda on a hot-fix on their side, but in case that doesn't work then we may need to use our fix.

Change-Id: I3187fc900e344c249c760ca74d1e809c70b21f9c
Reviewed-on: https://gerrit.dechocorp.com/26627
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
Reviewed-by: Russ Simons <russs@mozy.com>
5a76c9c
Commits on Dec 08, 2011
Wen Zhao add simple xml parser for atmos stuff
partially implements DOM

Change-Id: Ib0d96c9c02f151066002c97dc9407cb3588fe8bc
Reviewed-on: https://gerrit.dechocorp.com/26726
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
Reviewed-by: Kevin Cai <kcai@vmware.com>
faf1176
Russ Simons Recover from ERROR_BUFFER_OVERFLOW on GetAdaptersAddressest
tfixes #46951 - Dependent on kalypso changes

Change-Id: I7747928bad655587bc8e6d03a0c6806e76c60f2d
Reviewed-on: https://gerrit.dechocorp.com/26928
Reviewed-by: Henry Chen <hchen@vmware.com>
e3ea703
Commits on Dec 23, 2011
Dan Nuffer Ignore simpleappserver.
Change-Id: Ie3183e276dcf7b0ee8e438f08eeb88327f6a74b4
Reviewed-on: https://gerrit.dechocorp.com/27630
Reviewed-by: Kevin Harris <kevinhar@mozy.com>
6b5155f
Commits on Dec 29, 2011
Jeremy Stanley skip EFSStream tests if ::EncryptFileW fails
a failure there indicates the machine isn't capable of EFS,
either due to OS restriction (Home editions can't do it), or
bad recovery agent configuration.  in these cases, we can't
test the stream meaningfully, so skip the tests rather than
causing a spurious failure

Change-Id: I9926e6f4d522878f7cdca4770dcd2844761a316a
Reviewed-on: https://gerrit.dechocorp.com/27836
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Kevin Cai <kcai@vmware.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
ff00961
Commits on Dec 30, 2011
Eric Wang refs #74448, fix base64 decode defect
* a valid base64 string ends with "=" only (e.g. "xxx..xx=a" is invalid),
mordor should recognise this.

Change-Id: Ibaac0ec3dda7988cbccae69d71319f89a057e89e
Signed-off-by: Eric Wang <leiw@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/27777
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Kevin Cai <kcai@vmware.com>
090488b
Commits on Jan 02, 2012
Andrew Skowronski andrewsk Makefile fix for missing headers
Always install pq header files, otherwise the "make dist" does not
produce a complete set of headers.

Change-Id: I4d5793b55ed24f02a02abbb4ece36bc088aab6e6
Change-Id: I49efe70f89bbabc4d39c07905d425ca9c148b5bf
Reviewed-on: https://gerrit.dechocorp.com/27884
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Kevin Cai <kcai@vmware.com>
5f8e550
Commits on Jan 04, 2012
Dan Nuffer Add missing header to Makefile.am
xml/dom_parser.h is necessary for make distcheck to succeed.

Change-Id: Ibac8f4a2b6d3754e8a9a529d65b21222d839039d
Reviewed-on: https://gerrit.dechocorp.com/27942
Reviewed-by: Kevin Harris <kevinhar@mozy.com>
b986c3a
kevinhar Adding missing headers.
Header files should NEVER appear in an automake if.

Change-Id: I977178194b326a4890d2037b7413996246e2a089
Reviewed-on: https://gerrit.dechocorp.com/27999
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Dan Nuffer <dann@mozy.com>
f22992d
Commits on Jan 05, 2012
Kevin Cai kevincai add transferstream.chunksize ConfigVar
Change-Id: I1e2caa0f202f81195792b73b4a8d1485dcfdaf92
Signed-off-by: Kevin Cai <kcai@vmware.com>
Reviewed-on: https://gerrit.dechocorp.com/28035
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
6e1aecd
Kevin Cai kevincai make NotifyStream exception safe across threads
* catch (...) { throw; } requires catch point and throw point on the
  same thread. `throw' in different thread causes process terminate.
* notifyOnXXX callback function is not guaranteed to be back to the
  same thread when exit
* fix the problem by save the exception in catch point and rethrow it
  after notifyOnXXX is executed.

Change-Id: Iaf0b3a609bbcefbd00dec9832d2eb7579df96945
Signed-off-by: Kevin Cai <kcai@vmware.com>
Reviewed-on: https://gerrit.dechocorp.com/28030
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
be4081b
Kevin Cai kevincai sort include headers in Makefile.am, update .gitignore
Change-Id: I8dc4d5908f8e56fc7b2b68b6780dafe117c16eac
Signed-off-by: Kevin Cai <kcai@vmware.com>
Reviewed-on: https://gerrit.dechocorp.com/28033
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
4110e6b
Commits on Jan 09, 2012
Kevin Cai kevincai add toString() interface to Buffer class
* add convenient interface Buffer::toString() to ease the operation of
  converting readAvailiabe data in Buffer to std::string

Change-Id: Ic8710a9936daf97b237eb6a67d6e74d89e40fdb6
Signed-off-by: Kevin Cai <kcai@vmware.com>
Reviewed-on: https://gerrit.dechocorp.com/28175
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
7538314
Kevin Cai kevincai allow Buffer copyIn from std::string
* say good bye to copyIn(str.c_str(), str.size()).
* this interface is also very useful to deal with anonymous temp variable

Change-Id: I46997475051a0a01a0a56ef4b46b22a1a7fbe064
Signed-off-by: Kevin Cai <kcai@vmware.com>
Reviewed-on: https://gerrit.dechocorp.com/28189
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
c53d74b
Commits on Jan 13, 2012
Eric Wang refs #74929, degrade assert in base64decode
* too rude to assert when hitting an invalid base64 string,
should behave more friendly for caller.

Signed-off-by: Eric Wang <leiw@mozy.com>
Change-Id: I08142e188d6dd29b06e82cd780f0257fbf56fe50
Reviewed-on: https://gerrit.dechocorp.com/28370
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
495f5f4
Commits on Jan 17, 2012
Kevin Cai kevincai fix ServerRequest assertion in error case
* In pipeline mode, a request failure will clean all pending
  requests and schedule all waiting responses. Some of the assertions
  can't be held anymore.
* Add unit test to expose this problem and fix failed assertions

Change-Id: I853e54dcafe7b7fa530e2c9fca130266aa68b01c
Signed-off-by: Kevin Cai <kcai@vmware.com>
Reviewed-on: https://gerrit.dechocorp.com/28501
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
877c0d6
Kevin Cai kevincai add Thread::BookMark class to allow bookmarking and switching threads
* add Thread::BookMark class to allow bookmarking current thread id and
  scheduler and be able switch back to the same thread later with the
  bookmark.
* This is very useful in exception case to ensure that catch point and
  rethrow point be always on the same thread.

Change-Id: I49e2d0fdbfa6bf897e1ae6a5ff4dc24ab4475967
Signed-off-by: Kevin Cai <kcai@vmware.com>
Reviewed-on: https://gerrit.dechocorp.com/28558
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
fa3ba6c
Commits on Jan 20, 2012
Wen Zhao expose requestNumber (seqnum) from ServerRequest
used by places like patchappender
also fix compiler warning in UT

Change-Id: Iee27431d47a6f18b9d4b5de866f9d14cf523fa76
Reviewed-on: https://gerrit.dechocorp.com/28709
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
1d151a5
kevinhar Fixing warnings and compilation errors.
Most of the warnings are about shadowed functions (not overriding all versions of a parent class virtual function).

Compilation errors were failure to properly detect linux and not reporting that it is an unsupported platform, initialization of a non-const pointer from a pointer in a structure passed by const reference (the pointer is const as well).

Allowing --without-boost-program-options to be used without breaking at link time.  boost::program_options needs a compiled library and will conflict with use when -D_GLIBCXX_DEBUG is used as a compilation option.  Disabling the library (which has no other ill effects because it is only used in the samples) is the only reasonable workaround for now.

Change-Id: I34075faa23e9d604a35680ea3c004b62c1955817
Reviewed-on: https://gerrit.dechocorp.com/28492
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Dan Nuffer <dann@mozy.com>
dc44062
Commits on Jan 24, 2012
Cody Cutrer remove duplicate conditional 9753cf1
Commits on Feb 02, 2012
Kevin Cai kevincai Buffer::copyIn, Buffer::copyOut supports pos parameter
* add pos parameter to copyIn/copyOut interface to allow copy from given
  start point instead of beginning.

Change-Id: I8fba260c8ec3db1498027506e000c81cf825baab
Signed-off-by: Kevin Cai <kcai@vmware.com>
Reviewed-on: https://gerrit.dechocorp.com/29013
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
941eef9
Commits on Feb 03, 2012
Jeremy Stanley fix endless retry problem when server hangs up after 200 OK
refs #1032

RetryRequestBroker considered the request successful when 200 OK
was returned, and reset the retry counter to 0.  make HTTPStream
undo that and restore the original retry count if the first read
attempt after issuing the GET request fails.

Change-Id: I51aa1e2d590783cb881940e81e428f7ed686cd10
Reviewed-on: https://gerrit.dechocorp.com/29103
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
c59d465
Commits on Feb 09, 2012
Kevin Cai kevincai fix IOManager hanging issue
* IOManager will hang in write() in IOManager::tickle() in following
  scenario:
  - all threads are busy, none could be idle for a while.
  - tickleMe() get called in Scheduler::run() in certain cases, e.g.
    find some fibers that requests to execute on certain thread
  - tickleMe() continues write data to m_tickleFds[1]
  - in case no threads have a chance to idle, no one will read from
    m_tickleFds[0]. After sometime, all threads hanging in write()
    because the pipe is full.
* fix it by tracking idleThreadCount, don't tickle if no idle threads.

Change-Id: I601149dcef8eabde55a6317694881ab251d4b3e7
Signed-off-by: Kevin Cai <kcai@vmware.com>
Reviewed-on: https://gerrit.dechocorp.com/29279
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
d51ecea
Wen Zhao fix return type in Statistics::lookup method
Change-Id: Ide0b7382e607c97411868035c52c908895fbdcb0
Reviewed-on: https://gerrit.dechocorp.com/29163
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
Reviewed-by: Kevin Cai <kcai@vmware.com>
d354346
Commits on Feb 10, 2012
Kevin Cai kevincai fix mordor unit tests
* tolerate larger deviation in Socket::acceptTimeout
* in Scheduler::parallelForEachStopShort, the execution sequence is
  deterministic
* in Scheduler::parallelForEachStopShortParallel, the execution sequence
  is not deterministic, don't do the assertion

Change-Id: Iecdd73ccbeed634121fce2881133a95dbca99611
Signed-off-by: Kevin Cai <kcai@vmware.com>
Reviewed-on: https://gerrit.dechocorp.com/29343
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
3a58280
Commits on Feb 11, 2012
Eric Wang refs #42153, add watchdog feature in daemon
* when daemonizing in watchdog mode, mordor will fork a child process
to execute main. The parent process will monitor child's status and
restart it if it dies unexpectedly.

Change-Id: Id516441ec4c00c80fe1a7b5b9e16f7e3544eb1f8
Signed-off-by: Eric Wang <leiw@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/28669
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Kevin Cai <kcai@vmware.com>
d5b199e
Commits on Feb 13, 2012
Eric Wang refs #42153, quit watchdog correctly.
Change-Id: Ib52242a6b7e1e764e4470732a969d59486c9379f
Signed-off-by: Eric Wang <leiw@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/29454
Reviewed-by: Kevin Cai <kcai@vmware.com>
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
393e04e
Commits on Feb 17, 2012
Doug Schultz Made m_conninfo a local copy.
Fixed bad use of reference.

Change-Id: I2d7e048b4d601a195a51aaa31ef64090d89296e6
Reviewed-on: https://gerrit.dechocorp.com/29652
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
Reviewed-by: Kevin Cai <kcai@vmware.com>
36e750d
JT Olds jtolds add ipaddress specific lookup 2a5ac76
Cody Cutrer Merge pull request #8 from jtolds/next
add ipaddress specific lookup
473921f
JT Olds jtolds prevent stomping on service lookups e5e7ba4
Cody Cutrer Merge pull request #9 from jtolds/next
prevent stomping on service lookups
92af082
Commits on Feb 24, 2012
Kevin Cai kevincai hold the shared_ptr during timer execution
* weak_ptr.lock() returns a shared_ptr of the instance, however this
  shared_ptr is destroyed after implicitly converted to bool value in
  `if' condition statement.
* fix the issue by explicitly define a temporary variable.

Change-Id: I7fae512e3aa46173d1c07ceb06dc0c16268a48fb
Signed-off-by: Kevin Cai <kcai@vmware.com>
Reviewed-on: https://gerrit.dechocorp.com/29974
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
59ba90f
Commits on Feb 25, 2012
Kevin Cai kevincai escape '\0' in xml test-result
* most XML parsers can't parse xml file contains '\0', be friendly to
  this parsers.

Change-Id: Ibb95cbbe790aff90e2c7147949214e1bd659e520
Signed-off-by: Kevin Cai <kcai@vmware.com>
Reviewed-on: https://gerrit.dechocorp.com/29971
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
e1a234b
Commits on Feb 27, 2012
Kevin Cai kevincai set m_fiber, m_scheduler under ServerConnection::m_mutex
* in pipeline mode, if request B is waiting for requesting A responding
  complete, B is inserted into m_waitingResponses and m_fiber
  m_scheduler should be set under the ServerConnection::m_mutex. Failed
  to ensure this will cause race condition in
  ServerConnection::responseComplete() line 145, request B can be found
  in m_waitingResponses but its m_fiber and m_scheduler are still empty
  which causes crash.

Signed-off-by: Kevin Cai <kevinc@mozy.com>
Change-Id: If0879faac749d96f9983297bf0b945fa0a675b1a
Reviewed-on: https://gerrit.dechocorp.com/30031
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
4c21dde
Commits on Mar 02, 2012
Andrew Skowronski andrewsk Fix OSX warning
Same fix is present in Octopus fork so this brings us back in sync

(patch 2 fixes tab character)

Change-Id: I652b06947b3804037827e22e82c72a9363b7c48d
Reviewed-on: https://gerrit.dechocorp.com/30278
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
7c9b7f0
Commits on Mar 08, 2012
Kevin Cai kevincai make hasIdleThreads() virtual
* make hasIdleThreads() virtual so that derived class can override it
  for its own behavior.

Change-Id: I5cfdc733dd0c41d924dca6e5fac11f1f88e3ef7e
Signed-off-by: Kevin Cai <kcai@vmware.com>
Reviewed-on: https://gerrit.dechocorp.com/30402
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
ac2ad86
Commits on Mar 09, 2012
Kefu Chai tchaikov refs #75196, keep track of exception stack
* commit#fa3ba6 works around this issue by allowing fiber to return to a
  previously marked thread. this approach leverages libc++ ABI to retrieve
  and restore the exception stack.

Change-Id: I6319fe3c9425e295d769283e0cf2d51e41cd3395
Signed-off-by: Kefu Chai <chaik@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/28676
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Wen Zhao <wenz@mozy.com>
Reviewed-by: Kevin Cai <kcai@vmware.com>
9a592f8
Commits on Mar 20, 2012
Eric Wang refs #77652, quoting key when having special chars ("=")
Change-Id: I8a908ecd4f890aa1adc6c735c2e123fd12795575
Signed-off-by: Eric Wang <leiw@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/30765
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Kefu Chai <chaik@mozy.com>
Reviewed-by: Kevin Cai <kcai@vmware.com>
890b03b
Commits on Mar 21, 2012
Andrew Skowronski andrewsk Windows build fix for newer boost
Avoid "error C3859: virtual memory range for PCH exceeded"
error when compiling mordor on windows with boost 1.49

We already use the same argument in other vcxproj files such
as tethys and stash so this is a low risk fix.

Change-Id: Id8e8322cbb52e90cf8ead7947d3e81c093bbe296
Reviewed-on: https://gerrit.dechocorp.com/30922
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
6fd5c82
Josh Orr XCode 4.3 Upgrade Check
Change-Id: Ibf1b42f52a43709b3f9100fe9ab7879f4c79be36
Reviewed-on: https://gerrit.dechocorp.com/30939
Reviewed-by: Lance Helsten <lanceh@mozy.com>
f424725
Josh Orr Added new cxa_exception.c/.h files from latest next branch.
Change-Id: Id700926b117195a1be2ddc2549c9818b0fdaa75b
Reviewed-on: https://gerrit.dechocorp.com/30946
Reviewed-by: David Brown <davidb@mozy.com>
537f374
Commits on Mar 22, 2012
Eric Wang send FIN when ClientConnection finish sending data
Change-Id: I6a27412c84ac77cb65e3328afb4691a2587af28a
Signed-off-by: Eric Wang <leiw@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/30160
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
f96f0ca
Commits on Mar 23, 2012
Grady Player gradyplayer added oauth2.cpp,h to xcode project
Change-Id: I9a7b0e42287a3a9843987d16d5bef87e4228b737
Reviewed-on: https://gerrit.dechocorp.com/31078
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: David Brown <davidb@mozy.com>
871d4b7
Commits on Mar 27, 2012
Andrew Skowronski andrewsk Use 'lf' line endings consistently
Convention is to use 'lf' (posix style) line endings,
but over time a few inconsistencies have crept in.

Change-Id: Ibadc2733d1e89fa8eb833ffb8d78bedc1610568d
Reviewed-on: https://gerrit.dechocorp.com/31138
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
90b1c55
Commits on Mar 28, 2012
Andrew Skowronski andrewsk Fix test compilation on windows for boost 1.49
Similar to gerrit/30922 - the Zm200 flag
is needed.  We use that already in pretty much
all the other vcxproj files so this is low risk.

Change-Id: I70279072aed841ca628c759aa0532de912240719
Reviewed-on: https://gerrit.dechocorp.com/31248
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Jeremy Stanley <jeremy@mozy.com>
a660625
Commits on Mar 30, 2012
Cody Cutrer Revert "Use 'lf' line endings consistently"
This reverts commit 90b1c55.
7e7dbc6
Cody Cutrer Revert "Recover from ERROR_BUFFER_OVERFLOW on GetAdaptersAddressest"
This reverts commit e3ea703.
8e73c68
Cody Cutrer Revert "see #44076: auto create TempDir if it doesn't exist"
This reverts commit 9dccd7f.
ec90ba6
Cody Cutrer Revert "kalyspo #43532: avoid detect invalid proxy over and over again"
This reverts commit 704a62c.
0ad2e32
Cody Cutrer Revert "refs #42153, quit watchdog correctly."
This reverts commit 393e04e.
b4a462b
Cody Cutrer Revert "refs #42153, add watchdog feature in daemon"
This reverts commit d5b199e.
276897e
Cody Cutrer throw an exception instead of silent failing bad base64 ceeb9f0
Cody Cutrer Merge remote branch 'mozy/next' into next
Conflicts:
	Makefile.am
	mordor/http/client.h
	mordor/socket.cpp
	mordor/streams/duplex.h
	mordor/tests/buffered_stream.cpp
	mordor/tests/iomanager.cpp
580f84c
Cody Cutrer Revert "Revert "Use 'lf' line endings consistently""
This reverts commit 7e7dbc6.

Conflicts:

	mordor/http/proxy.cpp
	mordor/socket.cpp
2ed7c11
Cody Cutrer Partially revert "make NotifyStream exception safe across threads"
This reverts commit be4081b.

Keep the tests though.

Conflicts:

	mordor/tests/notify_stream.cpp
985b056
Commits on May 26, 2012
Cody Cutrer fix compilation on gcc 4.6
it was complaining about an unused var that is legitimately unused
5cc2532
Commits on Jun 10, 2012
Cody Cutrer fix unused variable warning with GCC 4.6 with asserts disabled ed46664
Commits on Jun 15, 2012
Cody Cutrer avoid re-defining some win32/msvc settings if already set
i.e. from project settings
bd823ca
Commits on Jun 18, 2012
JT Olds jtolds Revert "fix IOManager hanging issue"
This reverts commit d51ecea.
2d26ee1
JT Olds jtolds more flexible base64 encoding 33202cd
Commits on Jun 19, 2012
Cody Cutrer Merge pull request #13 from jtolds/next
base64 flexibility and reverting crashy commit
0b5ddbc
Commits on Oct 03, 2012
Justin Santa Barbara justinsb Zero-initialize BoolVisitor & SizeVisitor
Avoid compiler warnings, unsure if it's a bug
5571760
Cody Cutrer Merge pull request #15 from fathomdb/zeroinitvisitors
Zero-initialize BoolVisitor & SizeVisitor
188aabb
Commits on Jan 16, 2013
Cody Cutrer VC2010 fixes
 * add xml DOM parser to project
 * fix mordorpq build on windows
a231999
Commits on Feb 13, 2013
Cody Cutrer separate out SSLStream::generateSelfSignedCertificate e976359
Commits on Mar 01, 2013
Cody Cutrer fix flushing parent of SSLStream when SSLStream is already flushed
this is important after accepting an SSL connection if the parent
is buffering
22ce904
Cody Cutrer ignore ipch directory from visual studio ef0c79d
Commits on Mar 19, 2013
Cody Cutrer upgrade VC projects to 2012
also remove VC2008 support (Visual Studio Express 2012 for
Windows Desktop is free).
cff157c
Cody Cutrer disable safeseh in debug mode (to allow edit and continue)
and get rid of the annoying warning
5d4b354
Cody Cutrer rate limiter
could be used for API rate limiting or login lockout use cases
50ee2f6