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>
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>
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>
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>
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>
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>
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>
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>
XCode 4.3 Upgrade Check

Change-Id: Ibf1b42f52a43709b3f9100fe9ab7879f4c79be36
Reviewed-on: https://gerrit.dechocorp.com/30939
Reviewed-by: Lance Helsten <lanceh@mozy.com>
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>
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>
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>
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>
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>
Revert "Use 'lf' line endings consistently"

This reverts commit 90b1c55afc8516a5f280417d82b4c42496b5a4af.
Revert "Recover from ERROR_BUFFER_OVERFLOW on GetAdaptersAddressest"

This reverts commit e3ea703df5b60ae0fba76f97f74f5e09c5eb9030.
Revert "see #44076: auto create TempDir if it doesn't exist"

This reverts commit 9dccd7f7290518e3d8e56756886868edd4978dac.
Revert "kalyspo #43532: avoid detect invalid proxy over and over again"

This reverts commit 704a62c4b09dae5eb5a8123206039d78dd1b09e7.
Revert "refs #42153, quit watchdog correctly."

This reverts commit 393e04e6ae81f04b2e0c7e38a2debcd7fe8b7551.
Revert "refs #42153, add watchdog feature in daemon"

This reverts commit d5b199e12e9e69b524450a54a68b0f8e1124c1a8.