X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Ffunctions.h;h=f1e5b466e0f8dcae5a7db7d72f8d0da217fd171a;hb=4a92bfe6da547eb599b76da068b8b908e1c509b7;hp=38309e7ddf5b97f320a74e12a1b3d281607a004b;hpb=dc4ab0a186edc8b270c8fa486104fabc567d25e7;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/functions.h b/src/src/functions.h index 38309e7dd..f1e5b466e 100644 --- a/src/src/functions.h +++ b/src/src/functions.h @@ -75,6 +75,7 @@ extern BOOL tls_openssl_options_parse(uschar *, long *); # endif extern int tls_read(void *, uschar *, size_t); extern int tls_server_start(uschar **); +extern void tls_shutdown_wr(void *); extern BOOL tls_smtp_buffered(void); extern int tls_ungetc(int); #if defined(EXIM_HAVE_INOTIFY) || defined(EXIM_HAVE_KEVENT) @@ -204,7 +205,6 @@ extern void deliver_set_expansions(address_item *); extern int deliver_split_address(address_item *); extern void deliver_succeeded(address_item *); -extern uschar *deliver_get_sender_address (uschar *id); extern void delivery_re_exec(int); extern void die_tainted(const uschar *, const uschar *, int); @@ -340,6 +340,9 @@ extern int match_isinlist(const uschar *, const uschar **, int, tree_node ** unsigned int *, int, BOOL, const uschar **); extern int match_check_string(const uschar *, const uschar *, int, BOOL, BOOL, BOOL, const uschar **); + +extern void message_start(void); +extern void message_tidyup(void); extern void md5_end(md5 *, const uschar *, int, uschar *); extern void md5_mid(md5 *, const uschar *); extern void md5_start(md5 *); @@ -514,6 +517,7 @@ extern BOOL spool_move_message(uschar *, uschar *, uschar *, uschar *); extern int spool_open_datafile(uschar *); extern int spool_open_temp(uschar *); extern int spool_read_header(uschar *, BOOL, BOOL); +extern uschar *spool_sender_from_msgid(const uschar *); extern int spool_write_header(uschar *, int, uschar **); extern int stdin_getc(unsigned); extern int stdin_feof(void); @@ -521,6 +525,8 @@ extern int stdin_ferror(void); extern int stdin_ungetc(int); extern void store_exit(void); +extern void store_init(void); + extern gstring *string_append(gstring *, int, ...) WARN_UNUSED_RESULT; extern gstring *string_append_listele(gstring *, uschar, const uschar *) WARN_UNUSED_RESULT; extern gstring *string_append_listele_n(gstring *, uschar, const uschar *, unsigned) WARN_UNUSED_RESULT; @@ -960,20 +966,34 @@ g->s = s; } +# ifndef COMPILE_UTILITY /******************************************************************************/ +/* Use store_malloc for DNSA structs, and explicit frees. Using the same pool +for them as the strings we proceed to copy from them meant they could not be +released, hence blowing 64k for every DNS lookup. That mounted up. With malloc +we do have to take care over marking tainted all copied strings. A separate pool +could be used and would handle that implicitly. */ #define store_get_dns_answer() store_get_dns_answer_trc(CUS __FUNCTION__, __LINE__) static inline dns_answer * store_get_dns_answer_trc(const uschar * func, unsigned line) { -return store_get_3(sizeof(dns_answer), TRUE, CCS func, line); /* use tainted mem */ +/* return store_get_3(sizeof(dns_answer), TRUE, CCS func, line); use tainted mem */ +return store_malloc_3(sizeof(dns_answer), CCS func, line); +} + +#define store_free_dns_answer(dnsa) store_free_dns_answer_trc(dnsa, CUS __FUNCTION__, __LINE__) + +static inline void +store_free_dns_answer_trc(dns_answer * dnsa, const uschar * func, unsigned line) +{ +store_free_3(dnsa, CCS func, line); } /******************************************************************************/ /* Routines with knowledge of spool layout */ -# ifndef COMPILE_UTILITY static inline void spool_pname_buf(uschar * buf, int len) {