summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfergus.henderson@gmail.com <fergus.henderson@gmail.com@01de4be4-8c4a-0410-9132-4925637da917>2012-05-16 17:45:38 +0000
committerfergus.henderson@gmail.com <fergus.henderson@gmail.com@01de4be4-8c4a-0410-9132-4925637da917>2012-05-16 17:45:38 +0000
commitdff81af2a9b6d8bc6709c0668d19ac78e254e60e (patch)
treec9165f269c174f5e0544c220a1305dc9b2b13488
parent391fbc4fde58821d293d6ac5444d8eae9f08234e (diff)
downloaddistcc-dff81af2a9b6d8bc6709c0668d19ac78e254e60e.tar.gz
Apply Ktonibud's patch for distcc issue 74
<http://code.google.com/p/distcc/issues/detail?id=74>: Return the host from backoff state, if local compilation returned the same result as remote one. git-svn-id: http://distcc.googlecode.com/svn/trunk@772 01de4be4-8c4a-0410-9132-4925637da917
-rw-r--r--src/compile.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/src/compile.c b/src/compile.c
index 08c4c95..df73e9c 100644
--- a/src/compile.c
+++ b/src/compile.c
@@ -753,16 +753,23 @@ dcc_build_somewhere(char *argv[],
/* Either compile locally, after remote failure, or simply do other cc tasks
as assembling, linking, etc. */
ret = dcc_compile_local(argv, input_fname);
- if (remote_ret != 0 && remote_ret != ret) {
- /* Oops! it seems what we did remotely is not the same as what we did
- locally. We normally send email in such situations (if emailing is
- enabled), but we attempt an a time analysis of source files in order
- to avoid doing so in case source files we changed during the build.
- */
- (void) dcc_please_send_email_after_investigation(
- input_fname,
- deps_fname,
- discrepancy_filename);
+ if (remote_ret != 0) {
+ if (remote_ret != ret) {
+ /* Oops! it seems what we did remotely is not the same as what we did
+ locally. We normally send email in such situations (if emailing is
+ enabled), but we attempt an a time analysis of source files in order
+ to avoid doing so in case source files we changed during the build.
+ */
+ (void) dcc_please_send_email_after_investigation(
+ input_fname,
+ deps_fname,
+ discrepancy_filename);
+ } else if (host) {
+ /* Remote compilation failed, but we failed to compile this file too.
+ * Don't punish that server, it's innocent.
+ */
+ dcc_enjoyed_host(host);
+ }
}
unlock_and_clean_up: