mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-10-02 04:02:18 +03:00
init refactoring: always call MHD_send_init_static_vars_()
This commit is contained in:
3 files changed
+5
-8
No files matched your search
@@ -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_ ();
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user