X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fradiusd.c;fp=src%2Fmain%2Fradiusd.c;h=a4e089ab4564e94f4585a52c137be5958b63abbf;hb=14a87b81409ef1b07f589b05f013b4e2356b75a3;hp=bffb2e5c15ce9214715939d74cd3813feaf93d58;hpb=4ca09576d948b5b74d83a3d981a3b121b87bae20;p=freeradius.git diff --git a/src/main/radiusd.c b/src/main/radiusd.c index bffb2e5..a4e089a 100644 --- a/src/main/radiusd.c +++ b/src/main/radiusd.c @@ -301,6 +301,23 @@ int main(int argc, char *argv[]) } /* + * According to the talloc peeps, no two threads + * may modify any part of a ctx tree with a common + * root without synchronisation. + * + * So we can't run with a null context and threads. + */ + if (main_config.memory_report) { + if (spawn_flag) { + fprintf(stderr, "radiusd: The server cannot produce memory reports (-M) in threaded mode\n"); + exit(EXIT_FAILURE); + } + talloc_enable_null_tracking(); + } else { + talloc_disable_null_tracking(); + } + + /* * Better here, so it doesn't matter whether we get passed * -xv or -vx. */