X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/7d2f2d360f5a8ac6e0055074db813c3c3cfbeeb4..e68def51cb753d730249565e630b549a73857ec1:/src/src/functions.h diff --git a/src/src/functions.h b/src/src/functions.h index 473fb8759..851cedd3f 100644 --- a/src/src/functions.h +++ b/src/src/functions.h @@ -363,8 +363,12 @@ extern int vaguely_random_number_fallback(int); extern BOOL queue_action(uschar *, int, uschar **, int, int); extern void queue_check_only(void); +extern unsigned queue_count(void); +extern unsigned queue_count_cached(void); extern void queue_list(int, uschar **, int); -extern void queue_count(void); +#ifdef EXPERIMENTAL_QUEUE_RAMP +extern void queue_notify_daemon(const uschar * hostname); +#endif extern void queue_run(uschar *, uschar *, BOOL); extern int random_number(int); @@ -417,8 +421,8 @@ extern uschar *rfc2047_decode2(uschar *, BOOL, uschar *, int, int *, int *, uschar **); extern int route_address(address_item *, address_item **, address_item **, address_item **, address_item **, int); -extern int route_check_prefix(const uschar *, const uschar *); -extern int route_check_suffix(const uschar *, const uschar *); +extern int route_check_prefix(const uschar *, const uschar *, unsigned *); +extern int route_check_suffix(const uschar *, const uschar *, unsigned *); extern BOOL route_findgroup(uschar *, gid_t *); extern BOOL route_finduser(const uschar *, struct passwd **, uid_t *); extern BOOL route_find_expanded_group(uschar *, uschar *, uschar *, gid_t *, @@ -620,10 +624,7 @@ return FALSE; #else extern BOOL is_tainted_fn(const void *); -extern void * tainted_base, * tainted_top; - -return f.taint_check_slow - ? is_tainted_fn(p) : p >= tainted_base && p < tainted_top; +return is_tainted_fn(p); #endif } @@ -918,6 +919,18 @@ va_end(ap); return g; } + +/* Copy the content of a string to tainted memory */ + +static inline void +gstring_rebuffer(gstring * g) +{ +uschar * s = store_get(g->size, TRUE); +memcpy(s, g->s, g->ptr); +g->s = s; +} + + /******************************************************************************/ #define store_get_dns_answer() store_get_dns_answer_trc(CUS __FUNCTION__, __LINE__) @@ -1046,7 +1059,7 @@ static inline void testharness_pause_ms(int millisec) { #ifndef MEASURE_TIMING -if (f.running_in_test_harness) millisleep(millisec); +if (f.running_in_test_harness && f.testsuite_delays) millisleep(millisec); #endif }