From 8d7b0d259f742eeeef5c6b54cb4ebb81c5351662 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Fri, 22 Jun 2012 20:31:07 +0930 Subject: [PATCH] Add a compile time knob to disable timing checks (on by default now). --- Makefile.in | 1 + serval.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/Makefile.in b/Makefile.in index 0796bd36..11e43b8d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -75,6 +75,7 @@ CFLAGS= @CPPFLAGS@ @CFLAGS@ @PORTAUDIO_CFLAGS@ @SRC_CFLAGS@ @SPANDSP_CFLAGS@ @PT CFLAGS+=-Wall -Wno-unused-value #CFLAGS+=-Wunreachable-code #CFLAGS+=-O0 +CFLAGS+=-DDO_TIMING_CHECKS DEFS= @DEFS@ diff --git a/serval.h b/serval.h index 545f6682..f04d9047 100755 --- a/serval.h +++ b/serval.h @@ -115,9 +115,13 @@ struct in_addr { #define bzero(addr,len) memset((addr), 0, (len)) /* @PGS/20120615 */ +#ifdef DO_TIMING_CHECKS #define TIMING_CHECK() _TIMING_CHECK(__FILE__,__FUNCTION__,__LINE__) void _TIMING_CHECK(const char *file,const char *func,int line); void TIMING_PAUSE(); +#else +#define TIMING_CHECK() +#endif /* UDP Port numbers for various Serval services. The overlay mesh works over DNA */