summaryrefslogtreecommitdiff
path: root/src/dparent.c
diff options
context:
space:
mode:
authorEric Fontaine <eric@ericfontainejazz.com>2016-07-03 02:20:51 -0400
committerEric Fontaine <eric@ericfontainejazz.com>2016-07-07 07:56:06 -0400
commit47d0e480e9cf9eae02d00cfb92dfa368ee298a9a (patch)
tree19a181bbd9b53f1a04289ec875a960c3c902f6b1 /src/dparent.c
parent544904cdc835ed010cb2ccded3e996b6618fb6bd (diff)
downloaddistcc-git-47d0e480e9cf9eae02d00cfb92dfa368ee298a9a.tar.gz
allow -j (jobs) parameter with zeroconf
If server is started in zeroconf mode, the previous behavior was that the number of jobs for any server was hardcoded to 4 * number of cpus. This commit allows distccd to be invoked in zeroconf mode with the -j parameter to specify n_jobs, the maximum number of concurrent jobs for this server. If no -j is specified, then this host will publish its n_jobs to be 2 * number of cores + 2. (Note: this is the same behavior as when invoking a non-zerconf server without specifying -j.) To maintain backward compatibily, if a distccd zeroconf server doesn't publish a value for n_jobs, then it will be assigned a default n_jobs equal to the previous behavior of 4 * number of cores.
Diffstat (limited to 'src/dparent.c')
-rw-r--r--src/dparent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dparent.c b/src/dparent.c
index 77a4ac5..f8dc534 100644
--- a/src/dparent.c
+++ b/src/dparent.c
@@ -141,7 +141,7 @@ int dcc_standalone_server(void)
#ifdef HAVE_AVAHI
/* Zeroconf registration */
if (opt_zeroconf) {
- if (!(avahi = dcc_zeroconf_register((uint16_t) arg_port, n_cpus)))
+ if (!(avahi = dcc_zeroconf_register((uint16_t) arg_port, n_cpus, dcc_max_kids)))
return EXIT_CONNECT_FAILED;
}
#endif