X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fprocess.c;h=71a3f37aaa6efbd88c86de80690759477f2887e0;hb=ad999637d4262b09dbd705e82a637a82170431e9;hp=a3aad00b5e7dcaa93ba329a5f17d5430b418aff2;hpb=c0a24516bd092760bfbd2c0fa15048302a0161e2;p=freeradius.git diff --git a/src/main/process.c b/src/main/process.c index a3aad00..71a3f37 100644 --- a/src/main/process.c +++ b/src/main/process.c @@ -109,6 +109,22 @@ static char const *child_state_names[REQUEST_CHILD_NUM_STATES] = { &when, &request->ev); +#ifdef HAVE_PTHREAD_H +#undef VERIFY_REQUEST + +#if defined(WITH_VERIFY_PTR) +# define VERIFY_REQUEST(_x) if (pthread_equal(pthread_self(), _x->child_pid) != 0) verify_request(__FILE__, __LINE__, _x) +#else +/* + * Even if were building without WITH_VERIFY_PTR + * the pointer must not be NULL when these various macros are used + * so we can add some sneaky asserts. + */ +# define VERIFY_REQUEST(_x) rad_assert(_x) +#endif + +#endif + /** * @section request_timeline