init refactoring: always call MHD_send_init_static_vars_()

This commit is contained in:
Evgeny Grin (Karlson2k) committed 2021-04-16 14:20:46 +03:00
1 parent 6c751386a2
commit a1371a29ec
3 files changed
+5 -8

No files matched your search

-2
View File
@@ -8015,9 +8015,7 @@ MHD_init (void)
gnutls_global_init ();
#endif /* HTTPS_SUPPORT */
MHD_monotonic_sec_counter_init ();
#ifdef HAVE_FREEBSD_SENDFILE
MHD_send_init_static_vars_ ();
#endif /* HAVE_FREEBSD_SENDFILE */
MHD_init_mem_pools_ ();
}
+5 -3
View File
@@ -82,6 +82,9 @@ static int freebsd_sendfile_flags_;
*/
static int freebsd_sendfile_flags_thd_p_c_;
#endif /* SF_FLAGS */
#endif /* HAVE_FREEBSD_SENDFILE */
/**
* Initialises static variables
*/
@@ -91,6 +94,7 @@ MHD_send_init_static_vars_ (void)
/* FreeBSD 11 and later allow to specify read-ahead size
* and handles SF_NODISKIO differently.
* SF_FLAGS defined only on FreeBSD 11 and later. */
#ifdef HAVE_FREEBSD_SENDFILE
#ifdef SF_FLAGS
long sys_page_size = sysconf (_SC_PAGESIZE);
if (0 >= sys_page_size)
@@ -108,10 +112,8 @@ MHD_send_init_static_vars_ (void)
/ sys_page_size), SF_NODISKIO);
}
#endif /* SF_FLAGS */
}
#endif /* HAVE_FREEBSD_SENDFILE */
}
bool
-3
View File
@@ -46,15 +46,12 @@
#define MHD_VECT_SEND 1
#endif /* HAVE_SENDMSG || HAVE_WRITEV || MHD_WINSOCK_SOCKETS */
#ifdef HAVE_FREEBSD_SENDFILE
/**
* Initialises static variables
*/
void
MHD_send_init_static_vars_ (void);
#endif /* HAVE_FREEBSD_SENDFILE */
/**
* Send buffer to the client, push data from network buffer if requested