1
0
mirror of https://github.com/stefanocasazza/ULib.git synced 2025-09-28 19:05:55 +08:00

MACOS fix

This commit is contained in:
stefanocasazza 2016-02-29 18:00:26 +01:00
parent 1737869ae9
commit 2d1d846a7f
16 changed files with 302 additions and 258 deletions

180
configure vendored
View File

@ -875,7 +875,6 @@ MINGW_FALSE
MINGW_TRUE
LINUX_FALSE
LINUX_TRUE
PKG_CONFIG
LN_S
am__fastdepCXX_FALSE
am__fastdepCXX_TRUE
@ -883,6 +882,7 @@ CXXDEPMODE
ac_ct_CXX
CXXFLAGS
CXX
PKG_CONFIG
CROSS_COMPILING_FALSE
CROSS_COMPILING_TRUE
EGREP
@ -5959,7 +5959,60 @@ $as_echo "$TARGET_LIBC" >&6; }
fi
# check for cross compiling
if test "$cross_compiling" = "yes"; then
if test "$cross_compiling" != "yes"; then
if false; then
CROSS_COMPILING_TRUE=
CROSS_COMPILING_FALSE='#'
else
CROSS_COMPILING_TRUE='#'
CROSS_COMPILING_FALSE=
fi
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "X$PKG_CONFIG" != "X"; then
PKG_CONFIG_PATH=`pkg-config --variable pc_path pkg-config`
fi
else
if true; then
CROSS_COMPILING_TRUE=
CROSS_COMPILING_FALSE='#'
@ -5981,16 +6034,6 @@ $as_echo "${T_MD}Build for Target <${target}> with Environment <${STAGING_DIR}>:
$as_echo "#define CROSS_COMPILE 1" >>confdefs.h
else
if false; then
CROSS_COMPILING_TRUE=
CROSS_COMPILING_FALSE='#'
else
CROSS_COMPILING_TRUE='#'
CROSS_COMPILING_FALSE=
fi
PKG_CONFIG_PATH=`pkg-config --variable pc_path pkg-config`
fi
# checks for programs
@ -7334,47 +7377,6 @@ $as_echo "no" >&6; }
SET_MAKE="MAKE=${MAKE-make}"
fi
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
@ -24732,27 +24734,27 @@ fi
# SECTION 4: checks for libraries
libz_version="no"
libzopfli_version="no"
libtdb_version="no"
pcre_version="no"
ldap_version="no"
expat_version="no"
libssh_version="no"
libcurl_version="no"
ssl_version="no"
libmagic_version="no"
libmysql_version="no"
libsqlite_version="no"
pgsql_version="no"
libuuid_version="no"
libevent_version="no"
libxml2_version="no"
libdbi_version="no"
page_speed_version="no"
v8_version="no"
php_version="no"
rubyversion="no"
libz_version="unknow"
libzopfli_version="unknown"
libtdb_version="unknown"
pcre_version="unknown"
ldap_version="unknown"
expat_version="unknown"
libssh_version="unknown"
libcurl_version="unknown"
ssl_version="unknown"
libmagic_version="unknown"
libmysql_version="unknown"
libsqlite_version="unknown"
pgsql_version="unknown"
libuuid_version="unknown"
libevent_version="unknown"
libxml2_version="unknown"
libdbi_version="unknown"
page_speed_version="unknown"
v8_version="unknown"
php_version="unknown"
rubyversion="unknown"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
@ -24805,7 +24807,7 @@ $as_echo "#define USE_LIBZ 1" >>confdefs.h
libz_version="unknown"
fi
ULIB_LIBS="$ULIB_LIBS -lz";
if test $libzdir != "${CROSS_ENVIRONMENT}/" -a $libzdir != "${CROSS_ENVIRONMENT}/usr"; then
if test $libzdir != "${CROSS_ENVIRONMENT}/" -a $libzdir != "${CROSS_ENVIRONMENT}/usr" -a $libzdir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$libzdir/include"
LDFLAGS="$LDFLAGS -L$libzdir/lib -Wl,-R$libzdir/lib";
PRG_LDFLAGS="$PRG_LDFLAGS -L$libzdir/lib";
@ -24877,7 +24879,7 @@ $as_echo "#define USE_LIBTDB 1" >>confdefs.h
libtdb_version="unknown"
fi
ULIB_LIBS="$ULIB_LIBS -ltdb";
if test $libtdbdir != "${CROSS_ENVIRONMENT}/" -a $libtdbdir != "${CROSS_ENVIRONMENT}/usr"; then
if test $libtdbdir != "${CROSS_ENVIRONMENT}/" -a $libtdbdir != "${CROSS_ENVIRONMENT}/usr" -a $libtdbdir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$libtdbdir/include"
LDFLAGS="$LDFLAGS -L$libtdbdir/lib -Wl,-R$libtdbdir/lib";
PRG_LDFLAGS="$PRG_LDFLAGS -L$libtdbdir/lib";
@ -24934,7 +24936,7 @@ $as_echo "#define USE_LIBZOPFLI 1" >>confdefs.h
libzopfli_version="unknown"
fi
ULIB_LIBS="$ULIB_LIBS -lzopfli";
if test $libzopflidir != "${CROSS_ENVIRONMENT}/" -a $libzopflidir != "${CROSS_ENVIRONMENT}/usr"; then
if test $libzopflidir != "${CROSS_ENVIRONMENT}/" -a $libzopflidir != "${CROSS_ENVIRONMENT}/usr" -a $libzopflidir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$libzopflidir/include"
LDFLAGS="$LDFLAGS -L$libzopflidir/lib -Wl,-R$libzopflidir/lib";
PRG_LDFLAGS="$PRG_LDFLAGS -L$libzopflidir/lib";
@ -24990,7 +24992,7 @@ $as_echo "#define USE_LIBMAGIC 1" >>confdefs.h
libmagic_version="unknown"
fi
ULIB_LIBS="-lmagic $ULIB_LIBS";
if test $magicdir != "${CROSS_ENVIRONMENT}/" -a $magicdir != "${CROSS_ENVIRONMENT}/usr"; then
if test $magicdir != "${CROSS_ENVIRONMENT}/" -a $magicdir != "${CROSS_ENVIRONMENT}/usr" -a $magicdir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$magicdir/include";
LDFLAGS="$LDFLAGS -L$magicdir/lib -Wl,-R$magicdir/lib";
PRG_LDFLAGS="$PRG_LDFLAGS -L$magicdir/lib";
@ -25069,7 +25071,7 @@ $as_echo "#define HAVE_SSL_TS 1" >>confdefs.h
if test -z "${ssl_version}"; then
ssl_version="unknown";
fi
if test $ssldir != "${CROSS_ENVIRONMENT}/" -a $ssldir != "${CROSS_ENVIRONMENT}/usr"; then
if test $ssldir != "${CROSS_ENVIRONMENT}/" -a $ssldir != "${CROSS_ENVIRONMENT}/usr" -a $ssldir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$ssldir/include";
LDFLAGS="$LDFLAGS -L$ssldir/lib -Wl,-R$ssldir/lib";
PRG_LDFLAGS="$PRG_LDFLAGS -L$ssldir/lib";
@ -25125,7 +25127,7 @@ $as_echo "#define USE_LIBPCRE 1" >>confdefs.h
pcre_version="unknown"
fi
ULIB_LIBS="-lpcre $ULIB_LIBS";
if test $pcredir != "${CROSS_ENVIRONMENT}/" -a $pcredir != "${CROSS_ENVIRONMENT}/usr"; then
if test $pcredir != "${CROSS_ENVIRONMENT}/" -a $pcredir != "${CROSS_ENVIRONMENT}/usr" -a $pcredir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$pcredir/include"
LDFLAGS="$LDFLAGS -L$pcredir/lib -Wl,-R$pcredir/lib";
PRG_LDFLAGS="$PRG_LDFLAGS -L$pcredir/lib";
@ -25184,7 +25186,7 @@ $as_echo "#define USE_LIBEXPAT 1" >>confdefs.h
expat_version="unknown"
fi
ULIB_LIBS="-lexpat $ULIB_LIBS";
if test $expatdir != "${CROSS_ENVIRONMENT}/" -a $expatdir != "${CROSS_ENVIRONMENT}/usr"; then
if test $expatdir != "${CROSS_ENVIRONMENT}/" -a $expatdir != "${CROSS_ENVIRONMENT}/usr" -a $expatdir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$expatdir/include"
LDFLAGS="$LDFLAGS -L$expatdir/lib -Wl,-R$expatdir/lib";
PRG_LDFLAGS="$PRG_LDFLAGS -L$expatdir/lib";
@ -25237,7 +25239,7 @@ $as_echo "#define USE_LIBUUID 1" >>confdefs.h
libuuid_version="unknown"
fi
ULIB_LIBS="-luuid $ULIB_LIBS";
if test $libuuiddir != "${CROSS_ENVIRONMENT}/" -a $libuuiddir != "${CROSS_ENVIRONMENT}/usr"; then
if test $libuuiddir != "${CROSS_ENVIRONMENT}/" -a $libuuiddir != "${CROSS_ENVIRONMENT}/usr" -a $libuuiddir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$libuuiddir/include";
LDFLAGS="$LDFLAGS -L$libuuiddir/lib -Wl,-R$libuuiddir/lib";
PRG_LDFLAGS="$PRG_LDFLAGS -L$libuuiddir/lib";
@ -25297,7 +25299,7 @@ $as_echo "#define USE_C_ARES 1" >>confdefs.h
cares_version="unknown"
fi
ULIB_LIBS="-lcares $ULIB_LIBS";
if test $caresdir != "${CROSS_ENVIRONMENT}/" -a $caresdir != "${CROSS_ENVIRONMENT}/usr"; then
if test $caresdir != "${CROSS_ENVIRONMENT}/" -a $caresdir != "${CROSS_ENVIRONMENT}/usr" -a $caresdir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$caresdir/include"
LDFLAGS="$LDFLAGS -L$caresdir/lib -Wl,-R$caresdir/lib";
PRG_LDFLAGS="$PRG_LDFLAGS -L$caresdir/lib";
@ -25342,7 +25344,7 @@ $as_echo "#define USE_LIBSSH 1" >>confdefs.h
libssh_version="unknown"
fi
ULIB_LIBS="-lssh $ULIB_LIBS";
if test $sshdir != "${CROSS_ENVIRONMENT}/" -a $sshdir != "${CROSS_ENVIRONMENT}/usr"; then
if test $sshdir != "${CROSS_ENVIRONMENT}/" -a $sshdir != "${CROSS_ENVIRONMENT}/usr" -a $sshdir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$sshdir/include";
LDFLAGS="$LDFLAGS -L$sshdir/lib -Wl,-R$sshdir/lib";
PRG_LDFLAGS="$PRG_LDFLAGS -L$sshdir/lib";
@ -25387,7 +25389,7 @@ $as_echo "#define USE_LIBCURL 1" >>confdefs.h
libcurl_version="unknown"
fi
ULIB_LIBS="-lcurl $ULIB_LIBS";
if test $curldir != "${CROSS_ENVIRONMENT}/" -a $curldir != "${CROSS_ENVIRONMENT}/usr"; then
if test $curldir != "${CROSS_ENVIRONMENT}/" -a $curldir != "${CROSS_ENVIRONMENT}/usr" -a $curldir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$curldir/include";
LDFLAGS="$LDFLAGS -L$curldir/lib -Wl,-R$curldir/lib";
PRG_LDFLAGS="$PRG_LDFLAGS -L$curldir/lib";
@ -25453,7 +25455,7 @@ $as_echo "#define USE_LIBLDAP 1" >>confdefs.h
ldap_version="unknown"
fi
ULIB_LIBS="$LDAP_LIBS $ULIB_LIBS";
if test $ldapdir != "${CROSS_ENVIRONMENT}/" -a $ldapdir != "${CROSS_ENVIRONMENT}/usr"; then
if test $ldapdir != "${CROSS_ENVIRONMENT}/" -a $ldapdir != "${CROSS_ENVIRONMENT}/usr" -a $ldapdir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$LDAP_INCS"
LDFLAGS="$LDFLAGS -L$LDAP_LDFLAGS -Wl,-R$LDAP_LDFLAGS"
PRG_LDFLAGS="$PRG_LDFLAGS -L$ldapdir/lib";
@ -25498,7 +25500,7 @@ $as_echo "#define USE_LIBDBI 1" >>confdefs.h
libdbi_version="unknown"
fi
ULIB_LIBS="-ldbi $ULIB_LIBS";
if test $dbidir != "${CROSS_ENVIRONMENT}/" -a $dbidir != "${CROSS_ENVIRONMENT}/usr"; then
if test $dbidir != "${CROSS_ENVIRONMENT}/" -a $dbidir != "${CROSS_ENVIRONMENT}/usr" -a $dbidir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$dbidir/include";
LDFLAGS="$LDFLAGS -L$dbidir/lib -Wl,-R$dbidir/lib";
PRG_LDFLAGS="$PRG_LDFLAGS -L$dbidir/lib";
@ -25548,7 +25550,7 @@ $as_echo "#define USE_LIBEVENT 1" >>confdefs.h
libevent_version="unknown"
fi
ULIB_LIBS="-levent $ULIB_LIBS";
if test $libeventdir != "${CROSS_ENVIRONMENT}/" -a $libeventdir != "${CROSS_ENVIRONMENT}/usr"; then
if test $libeventdir != "${CROSS_ENVIRONMENT}/" -a $libeventdir != "${CROSS_ENVIRONMENT}/usr" -a $libeventdir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$libeventdir/include";
LDFLAGS="$LDFLAGS -L$libeventdir/lib -Wl,-R$libeventdir/lib";
PRG_LDFLAGS="$PRG_LDFLAGS -L$libeventdir/lib";
@ -25595,7 +25597,7 @@ $as_echo "#define USE_LIBXML2 1" >>confdefs.h
libxml2_version="unknown"
fi
ULIB_LIBS="-lxml2 $ULIB_LIBS";
if test $libxml2dir != "${CROSS_ENVIRONMENT}/" -a $libxml2dir != "${CROSS_ENVIRONMENT}/usr"; then
if test $libxml2dir != "${CROSS_ENVIRONMENT}/" -a $libxml2dir != "${CROSS_ENVIRONMENT}/usr" -a $libxml2dir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$libxml2dir/include/libxml2";
LDFLAGS="$LDFLAGS -L$libxml2dir/lib -Wl,-R$libxml2dir/lib";
PRG_LDFLAGS="$PRG_LDFLAGS -L$libxml2dir/lib";

View File

@ -197,7 +197,13 @@ fi
AS_IF([test "x$TARGET_LIBC" = xunknown], [AC_MSG_RESULT([unknown])], [test "x$TARGET_LIBC" != xunknown], [AC_MSG_RESULT([$TARGET_LIBC])])
# check for cross compiling
if test "$cross_compiling" = "yes"; then
if test "$cross_compiling" != "yes"; then
AM_CONDITIONAL(CROSS_COMPILING, false)
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "X$PKG_CONFIG" != "X"; then
PKG_CONFIG_PATH=`pkg-config --variable pc_path pkg-config`
fi
else
AM_CONDITIONAL(CROSS_COMPILING, true)
PKG_CONFIG_PATH=${STAGING_DIR}/usr/lib/pkgconfig
TWOCAN_CONF_MSG(Build for Target <${target}> with Environment <${STAGING_DIR}>)
@ -205,9 +211,6 @@ if test "$cross_compiling" = "yes"; then
CROSS_ENVIRONMENT=$STAGING_DIR
fi
AC_DEFINE([CROSS_COMPILE],[1],[Define if we are cross compiling])
else
AM_CONDITIONAL(CROSS_COMPILING, false)
PKG_CONFIG_PATH=`pkg-config --variable pc_path pkg-config`
fi
# checks for programs
@ -220,7 +223,6 @@ AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
AC_C_RESTRICT
AC_C_VOLATILE
@ -1290,27 +1292,27 @@ fi
# SECTION 4: checks for libraries
libz_version="no"
libzopfli_version="no"
libtdb_version="no"
pcre_version="no"
ldap_version="no"
expat_version="no"
libssh_version="no"
libcurl_version="no"
ssl_version="no"
libmagic_version="no"
libmysql_version="no"
libsqlite_version="no"
pgsql_version="no"
libuuid_version="no"
libevent_version="no"
libxml2_version="no"
libdbi_version="no"
page_speed_version="no"
v8_version="no"
php_version="no"
rubyversion="no"
libz_version="unknow"
libzopfli_version="unknown"
libtdb_version="unknown"
pcre_version="unknown"
ldap_version="unknown"
expat_version="unknown"
libssh_version="unknown"
libcurl_version="unknown"
ssl_version="unknown"
libmagic_version="unknown"
libmysql_version="unknown"
libsqlite_version="unknown"
pgsql_version="unknown"
libuuid_version="unknown"
libevent_version="unknown"
libxml2_version="unknown"
libdbi_version="unknown"
page_speed_version="unknown"
v8_version="unknown"
php_version="unknown"
rubyversion="unknown"
TWOCAN_CONF_MSG(Checking for libraries to link against)

View File

@ -32,6 +32,8 @@ extern U_EXPORT void runDynamicPage_wi_auth(int param);
static UHTTP::service_info GET_table[] = { // NB: the table must be ordered alphabetically for binary search...
GET_ENTRY(admin),
GET_ENTRY(admin_continuing_status_ap),
GET_ENTRY(admin_current_status_ap),
GET_ENTRY(admin_edit_ap),
GET_ENTRY(admin_export_statistics_login_as_csv),
GET_ENTRY(admin_export_statistics_registration_as_csv),

View File

@ -10,6 +10,8 @@ static long start_op;
<!--#code
static UHTTP::service_info GET_table[] = { // NB: the table must be ordered alphabetically for binary search...
GET_ENTRY(admin),
GET_ENTRY(admin_continuing_status_ap),
GET_ENTRY(admin_current_status_ap),
GET_ENTRY(admin_edit_ap),
GET_ENTRY(admin_export_statistics_login_as_csv),
GET_ENTRY(admin_export_statistics_registration_as_csv),

View File

@ -3411,6 +3411,20 @@ static void GET_admin()
USSIPlugIn::setAlternativeRedirect("https://%v/admin.html", ip_server->rep);
}
static void GET_admin_continuing_status_ap()
{
U_TRACE_NO_PARAM(5, "::GET_admin_continuing_status_ap()")
if (UServer_Base::bssl == false) USSIPlugIn::setBadRequest();
}
static void GET_admin_current_status_ap()
{
U_TRACE_NO_PARAM(5, "::GET_admin_current_status_ap()")
if (UServer_Base::bssl == false) USSIPlugIn::setBadRequest();
}
static void GET_admin_edit_ap()
{
U_TRACE_NO_PARAM(5, "::GET_admin_edit_ap()")
@ -6772,6 +6786,18 @@ static void GET_tavarnelle()
{
GET_admin_view_statistics_login();
}
else if (U_HTTP_QUERY_STREQ("admin_view_statistics_login")) // STATISTICHE: Accessi
{
GET_admin_view_statistics_login();
}
else if (U_HTTP_QUERY_STREQ("admin_current_status_ap")) // SITUAZIONE CORRENTE
{
GET_admin_current_status_ap();
}
else if (U_HTTP_QUERY_STREQ("admin_continuing_status_ap")) // MONITORAGGIO CONTINUATIVO
{
GET_admin_continuing_status_ap();
}
else
{
USSIPlugIn::setMessagePage(admin_cache->getContent(U_CONSTANT_TO_PARAM("message_page.tmpl")), "Servizio non disponibile (non ancora implementato). Riprovare piu' tardi");

View File

@ -155,6 +155,7 @@ public:
const char* getResponseData() const { return response.data(); }
unsigned int getPort() const { return port; }
bool setUrl(const UString& url); // NB: return if it has modified host or port...
bool remoteIPAddress(UIPAddress& addr);
bool setHostPort(const UString& host, unsigned int port);
@ -232,7 +233,6 @@ protected:
static bool log_shared_with_server, bIPv6;
bool readHTTPResponse();
bool setUrl(const UString& url); // NB: return if it has modified host or port...
void prepareRequest(const char* req, uint32_t len)
{

View File

@ -114,7 +114,6 @@ class UDataStorage;
class UStreamPlugIn;
class UModNoCatPeer;
class UClientThread;
class UOCSPStapling;
class UHttpClient_Base;
class UWebSocketPlugIn;
class UModProxyService;
@ -188,8 +187,8 @@ public:
// tipologia server...
static bool bssl, bipc;
static UFileConfig* cfg;
static bool bssl, bipc, flag_loop;
static unsigned int port; // the port number to bind to
static int getReqTimeout() { return (ptime ? ptime->UTimeVal::tv_sec : 0); }
@ -296,7 +295,7 @@ public:
# ifdef USE_LIBSSL
sem_t lock_ssl_session;
char spinlock_ssl_session[1];
# if defined(ENABLE_THREAD) && !defined(OPENSSL_NO_OCSP) && defined(SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB)
# if defined(ENABLE_THREAD) && !defined(OPENSSL_NO_OCSP) && defined(SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB) && !defined(_MSWINDOWS_)
sem_t lock_ocsp_staple;
char spinlock_ocsp_staple[1];
# endif
@ -509,6 +508,22 @@ public:
static UString getNetworkDevice( const char* exclude) { return USocketExt::getNetworkDevice(exclude); }
static UString getNetworkAddress(const char* device) { return USocketExt::getNetworkAddress(socket->getFd(), device); }
#if defined(USE_LIBSSL) && defined(ENABLE_THREAD) && !defined(OPENSSL_NO_OCSP) && defined(SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB) && !defined(_MSWINDOWS_)
static UThread* pthread_ocsp;
static ULock* lock_ocsp_staple;
static void setLockOCSPStaple()
{
U_TRACE_NO_PARAM(0, "UServer_Base::setLockOCSPStaple()")
U_INTERNAL_ASSERT_EQUALS(lock_ocsp_staple, 0)
lock_ocsp_staple = U_NEW(ULock);
lock_ocsp_staple->init(&(ptr_shared_data->lock_ocsp_staple), ptr_shared_data->spinlock_ocsp_staple);
}
#endif
// DEBUG
#if defined(DEBUG) && defined(U_STDCPP_ENABLE)
@ -542,7 +557,8 @@ protected:
static UString* cenvironment;
static UString* senvironment;
static UString* str_preforked_num_kids;
static bool flag_loop, flag_sigterm, monitoring_process, set_realtime_priority, public_address, binsert, set_tcp_keep_alive;
static bool flag_sigterm, monitoring_process, set_realtime_priority, public_address, binsert, set_tcp_keep_alive, called_from_handlerTime;
static uint32_t vplugin_size;
static UVector<UString>* vplugin_name;
@ -591,22 +607,6 @@ protected:
static void initThrottlingServer(const UString& data);
#endif
#if defined(USE_LIBSSL) && defined(ENABLE_THREAD) && !defined(OPENSSL_NO_OCSP) && defined(SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB)
static ULock* lock_ocsp_staple;
static UOCSPStapling* pthread_ocsp;
static void setLockOCSPStaple()
{
U_TRACE_NO_PARAM(0, "UServer_Base::setLockOCSPStaple()")
U_INTERNAL_ASSERT_EQUALS(lock_ocsp_staple, 0)
lock_ocsp_staple = U_NEW(ULock);
lock_ocsp_staple->init(&(ptr_shared_data->lock_ocsp_staple), ptr_shared_data->spinlock_ocsp_staple);
}
#endif
// COSTRUTTORI
UServer_Base(UFileConfig* pcfg);
@ -615,8 +615,6 @@ protected:
// VARIE
#ifdef U_LOG_ENABLE
static bool called_from_handlerTime;
static uint32_t getNumConnection(char* buffer);
#endif
@ -678,7 +676,6 @@ private:
friend class UNoCatPlugIn;
friend class UGeoIPPlugIn;
friend class UClient_Base;
friend class UOCSPStapling;
friend class UStreamPlugIn;
friend class UClientThread;
friend class UModNoCatPeer;

View File

@ -77,7 +77,6 @@ class UTCPSocket;
class UHttpPlugIn;
class UClient_Base;
class UServer_Base;
class UOCSPStapling;
class UClientImage_Base;
template <class T> class UClient;
@ -253,6 +252,37 @@ public:
virtual bool connectServer(const UString& server, unsigned int iServPort, int timeoutMS = 0) U_DECL_FINAL;
/**
* OCSP stapling is a way for a SSL server to obtain OCSP responses for his own certificate, and provide them to the client,
* under the assumption that the client may need them. This makes the whole process more efficient: the client does not have
* to open extra connections to get the OCSP responses itself, and the same OCSP response can be sent by the server to all
* clients within a given time frame. One way to see it is that the SSL server acts as a Web proxy for the purpose of
* downloading OCSP responses.
*/
#if !defined(OPENSSL_NO_OCSP) && defined(SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB)
typedef struct stapling {
void* data;
char* path;
long valid;
X509* cert;
X509* issuer;
UString* url;
EVP_PKEY* pkey;
int len, verify;
OCSP_CERTID* id;
OCSP_REQUEST* req;
UClient<UTCPSocket>* client;
} stapling;
static stapling staple;
static bool doStapling();
static void cleanupStapling();
static bool setDataForStapling();
static void certificate_status_callback(SSL* _ssl, void* data);
#endif
#if defined(U_STDCPP_ENABLE) && defined(DEBUG)
const char* dump(bool reset) const;
#endif
@ -288,37 +318,6 @@ protected:
static int callback_ServerNameIndication(SSL* _ssl, int* alert, void* data);
#endif
/**
* OCSP stapling is a way for a SSL server to obtain OCSP responses for his own certificate, and provide them to the client,
* under the assumption that the client may need them. This makes the whole process more efficient: the client does not have
* to open extra connections to get the OCSP responses itself, and the same OCSP response can be sent by the server to all
* clients within a given time frame. One way to see it is that the SSL server acts as a Web proxy for the purpose of
* downloading OCSP responses.
*/
#if !defined(OPENSSL_NO_OCSP) && defined(SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB)
typedef struct stapling {
void* data;
char* path;
long valid;
X509* cert;
X509* issuer;
UString* url;
EVP_PKEY* pkey;
int len, verify;
OCSP_CERTID* id;
OCSP_REQUEST* req;
UClient<UTCPSocket>* client;
} stapling;
static stapling staple;
static bool doStapling();
static void cleanupStapling();
static bool setDataForStapling();
static void certificate_status_callback(SSL* _ssl, void* data);
#endif
private:
static int nextProto(SSL* ssl, const unsigned char** data, unsigned int* len, void* arg) U_NO_EXPORT;
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
@ -338,7 +337,6 @@ private:
friend class UHttpPlugIn;
friend class UClient_Base;
friend class UServer_Base;
friend class UOCSPStapling;
friend class UClientImage_Base;
template <class T> friend class UClient;
template <class T> friend class UServer;

View File

@ -61,13 +61,13 @@ public:
struct Stream {
int32_t id;
int32_t state;
// internal
int32_t out_window;
int32_t inp_window;
// priority
uint32_t priority_dependency; // 0 if not set
char priority_weight; // 0 if not set
bool priority_exclusive;
// internal
// int32_t out_window;
// int32_t inp_window;
// priority
// uint32_t priority_dependency; // 0 if not set
// char priority_weight; // 0 if not set
// bool priority_exclusive;
};
static void ctor();
@ -87,7 +87,7 @@ public:
Settings peer_settings; // settings
ConnectionState state; // state
// internal
int32_t out_window; // sender flow control window
// int32_t out_window; // sender flow control window
int32_t inp_window; // receiver flow control window
int32_t hpack_max_capacity; // the value set by SETTINGS_HEADER_TABLE_SIZE
// streams

View File

@ -37,7 +37,7 @@ AC_DEFUN([AC_CHECK_PACKAGE],[
libz_version="unknown"
fi
ULIB_LIBS="$ULIB_LIBS -lz";
if test $libzdir != "${CROSS_ENVIRONMENT}/" -a $libzdir != "${CROSS_ENVIRONMENT}/usr"; then
if test $libzdir != "${CROSS_ENVIRONMENT}/" -a $libzdir != "${CROSS_ENVIRONMENT}/usr" -a $libzdir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$libzdir/include"
LDFLAGS="$LDFLAGS -L$libzdir/lib -Wl,-R$libzdir/lib";
PRG_LDFLAGS="$PRG_LDFLAGS -L$libzdir/lib";
@ -89,7 +89,7 @@ AC_DEFUN([AC_CHECK_PACKAGE],[
libtdb_version="unknown"
fi
ULIB_LIBS="$ULIB_LIBS -ltdb";
if test $libtdbdir != "${CROSS_ENVIRONMENT}/" -a $libtdbdir != "${CROSS_ENVIRONMENT}/usr"; then
if test $libtdbdir != "${CROSS_ENVIRONMENT}/" -a $libtdbdir != "${CROSS_ENVIRONMENT}/usr" -a $libtdbdir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$libtdbdir/include"
LDFLAGS="$LDFLAGS -L$libtdbdir/lib -Wl,-R$libtdbdir/lib";
PRG_LDFLAGS="$PRG_LDFLAGS -L$libtdbdir/lib";
@ -132,7 +132,7 @@ AC_DEFUN([AC_CHECK_PACKAGE],[
libzopfli_version="unknown"
fi
ULIB_LIBS="$ULIB_LIBS -lzopfli";
if test $libzopflidir != "${CROSS_ENVIRONMENT}/" -a $libzopflidir != "${CROSS_ENVIRONMENT}/usr"; then
if test $libzopflidir != "${CROSS_ENVIRONMENT}/" -a $libzopflidir != "${CROSS_ENVIRONMENT}/usr" -a $libzopflidir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$libzopflidir/include"
LDFLAGS="$LDFLAGS -L$libzopflidir/lib -Wl,-R$libzopflidir/lib";
PRG_LDFLAGS="$PRG_LDFLAGS -L$libzopflidir/lib";
@ -175,7 +175,7 @@ AC_DEFUN([AC_CHECK_PACKAGE],[
libmagic_version="unknown"
fi
ULIB_LIBS="-lmagic $ULIB_LIBS";
if test $magicdir != "${CROSS_ENVIRONMENT}/" -a $magicdir != "${CROSS_ENVIRONMENT}/usr"; then
if test $magicdir != "${CROSS_ENVIRONMENT}/" -a $magicdir != "${CROSS_ENVIRONMENT}/usr" -a $magicdir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$magicdir/include";
LDFLAGS="$LDFLAGS -L$magicdir/lib -Wl,-R$magicdir/lib";
PRG_LDFLAGS="$PRG_LDFLAGS -L$magicdir/lib";
@ -239,7 +239,7 @@ AC_DEFUN([AC_CHECK_PACKAGE],[
if test -z "${ssl_version}"; then
ssl_version="unknown";
fi
if test $ssldir != "${CROSS_ENVIRONMENT}/" -a $ssldir != "${CROSS_ENVIRONMENT}/usr"; then
if test $ssldir != "${CROSS_ENVIRONMENT}/" -a $ssldir != "${CROSS_ENVIRONMENT}/usr" -a $ssldir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$ssldir/include";
LDFLAGS="$LDFLAGS -L$ssldir/lib -Wl,-R$ssldir/lib";
PRG_LDFLAGS="$PRG_LDFLAGS -L$ssldir/lib";
@ -282,7 +282,7 @@ AC_DEFUN([AC_CHECK_PACKAGE],[
pcre_version="unknown"
fi
ULIB_LIBS="-lpcre $ULIB_LIBS";
if test $pcredir != "${CROSS_ENVIRONMENT}/" -a $pcredir != "${CROSS_ENVIRONMENT}/usr"; then
if test $pcredir != "${CROSS_ENVIRONMENT}/" -a $pcredir != "${CROSS_ENVIRONMENT}/usr" -a $pcredir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$pcredir/include"
LDFLAGS="$LDFLAGS -L$pcredir/lib -Wl,-R$pcredir/lib";
PRG_LDFLAGS="$PRG_LDFLAGS -L$pcredir/lib";
@ -328,7 +328,7 @@ AC_DEFUN([AC_CHECK_PACKAGE],[
expat_version="unknown"
fi
ULIB_LIBS="-lexpat $ULIB_LIBS";
if test $expatdir != "${CROSS_ENVIRONMENT}/" -a $expatdir != "${CROSS_ENVIRONMENT}/usr"; then
if test $expatdir != "${CROSS_ENVIRONMENT}/" -a $expatdir != "${CROSS_ENVIRONMENT}/usr" -a $expatdir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$expatdir/include"
LDFLAGS="$LDFLAGS -L$expatdir/lib -Wl,-R$expatdir/lib";
PRG_LDFLAGS="$PRG_LDFLAGS -L$expatdir/lib";
@ -368,7 +368,7 @@ AC_DEFUN([AC_CHECK_PACKAGE],[
libuuid_version="unknown"
fi
ULIB_LIBS="-luuid $ULIB_LIBS";
if test $libuuiddir != "${CROSS_ENVIRONMENT}/" -a $libuuiddir != "${CROSS_ENVIRONMENT}/usr"; then
if test $libuuiddir != "${CROSS_ENVIRONMENT}/" -a $libuuiddir != "${CROSS_ENVIRONMENT}/usr" -a $libuuiddir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$libuuiddir/include";
LDFLAGS="$LDFLAGS -L$libuuiddir/lib -Wl,-R$libuuiddir/lib";
PRG_LDFLAGS="$PRG_LDFLAGS -L$libuuiddir/lib";
@ -414,7 +414,7 @@ AC_DEFUN([AC_CHECK_PACKAGE],[
cares_version="unknown"
fi
ULIB_LIBS="-lcares $ULIB_LIBS";
if test $caresdir != "${CROSS_ENVIRONMENT}/" -a $caresdir != "${CROSS_ENVIRONMENT}/usr"; then
if test $caresdir != "${CROSS_ENVIRONMENT}/" -a $caresdir != "${CROSS_ENVIRONMENT}/usr" -a $caresdir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$caresdir/include"
LDFLAGS="$LDFLAGS -L$caresdir/lib -Wl,-R$caresdir/lib";
PRG_LDFLAGS="$PRG_LDFLAGS -L$caresdir/lib";
@ -448,7 +448,7 @@ dnl libssh_version=$(grep LIBSFTP_VERSION $sshdir/include/libssh/sftp.h | cut -
libssh_version="unknown"
fi
ULIB_LIBS="-lssh $ULIB_LIBS";
if test $sshdir != "${CROSS_ENVIRONMENT}/" -a $sshdir != "${CROSS_ENVIRONMENT}/usr"; then
if test $sshdir != "${CROSS_ENVIRONMENT}/" -a $sshdir != "${CROSS_ENVIRONMENT}/usr" -a $sshdir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$sshdir/include";
LDFLAGS="$LDFLAGS -L$sshdir/lib -Wl,-R$sshdir/lib";
PRG_LDFLAGS="$PRG_LDFLAGS -L$sshdir/lib";
@ -481,7 +481,7 @@ dnl libssh_version=$(grep LIBSFTP_VERSION $sshdir/include/libssh/sftp.h | cut -
libcurl_version="unknown"
fi
ULIB_LIBS="-lcurl $ULIB_LIBS";
if test $curldir != "${CROSS_ENVIRONMENT}/" -a $curldir != "${CROSS_ENVIRONMENT}/usr"; then
if test $curldir != "${CROSS_ENVIRONMENT}/" -a $curldir != "${CROSS_ENVIRONMENT}/usr" -a $curldir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$curldir/include";
LDFLAGS="$LDFLAGS -L$curldir/lib -Wl,-R$curldir/lib";
PRG_LDFLAGS="$PRG_LDFLAGS -L$curldir/lib";
@ -537,7 +537,7 @@ dnl ldap_version=$(ldapsearch -VV 2>&1 | tail -n1 | cut -d':' -f2 | cut -d')' -
ldap_version="unknown"
fi
ULIB_LIBS="$LDAP_LIBS $ULIB_LIBS";
if test $ldapdir != "${CROSS_ENVIRONMENT}/" -a $ldapdir != "${CROSS_ENVIRONMENT}/usr"; then
if test $ldapdir != "${CROSS_ENVIRONMENT}/" -a $ldapdir != "${CROSS_ENVIRONMENT}/usr" -a $ldapdir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$LDAP_INCS"
LDFLAGS="$LDFLAGS -L$LDAP_LDFLAGS -Wl,-R$LDAP_LDFLAGS"
PRG_LDFLAGS="$PRG_LDFLAGS -L$ldapdir/lib";
@ -570,7 +570,7 @@ dnl ldap_version=$(ldapsearch -VV 2>&1 | tail -n1 | cut -d':' -f2 | cut -d')' -
libdbi_version="unknown"
fi
ULIB_LIBS="-ldbi $ULIB_LIBS";
if test $dbidir != "${CROSS_ENVIRONMENT}/" -a $dbidir != "${CROSS_ENVIRONMENT}/usr"; then
if test $dbidir != "${CROSS_ENVIRONMENT}/" -a $dbidir != "${CROSS_ENVIRONMENT}/usr" -a $dbidir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$dbidir/include";
LDFLAGS="$LDFLAGS -L$dbidir/lib -Wl,-R$dbidir/lib";
PRG_LDFLAGS="$PRG_LDFLAGS -L$dbidir/lib";
@ -608,7 +608,7 @@ dnl ldap_version=$(ldapsearch -VV 2>&1 | tail -n1 | cut -d':' -f2 | cut -d')' -
libevent_version="unknown"
fi
ULIB_LIBS="-levent $ULIB_LIBS";
if test $libeventdir != "${CROSS_ENVIRONMENT}/" -a $libeventdir != "${CROSS_ENVIRONMENT}/usr"; then
if test $libeventdir != "${CROSS_ENVIRONMENT}/" -a $libeventdir != "${CROSS_ENVIRONMENT}/usr" -a $libeventdir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$libeventdir/include";
LDFLAGS="$LDFLAGS -L$libeventdir/lib -Wl,-R$libeventdir/lib";
PRG_LDFLAGS="$PRG_LDFLAGS -L$libeventdir/lib";
@ -643,7 +643,7 @@ dnl ldap_version=$(ldapsearch -VV 2>&1 | tail -n1 | cut -d':' -f2 | cut -d')' -
libxml2_version="unknown"
fi
ULIB_LIBS="-lxml2 $ULIB_LIBS";
if test $libxml2dir != "${CROSS_ENVIRONMENT}/" -a $libxml2dir != "${CROSS_ENVIRONMENT}/usr"; then
if test $libxml2dir != "${CROSS_ENVIRONMENT}/" -a $libxml2dir != "${CROSS_ENVIRONMENT}/usr" -a $libxml2dir != "${CROSS_ENVIRONMENT}/usr/local"; then
CPPFLAGS="$CPPFLAGS -I$libxml2dir/include/libxml2";
LDFLAGS="$LDFLAGS -L$libxml2dir/lib -Wl,-R$libxml2dir/lib";
PRG_LDFLAGS="$PRG_LDFLAGS -L$libxml2dir/lib";

View File

@ -498,6 +498,8 @@ void UClientImage_Base::handlerDelete()
flag.u = 0;
UEventFd::fd = -1;
U_INTERNAL_ASSERT_EQUALS(data_pending, 0)
U_INTERNAL_ASSERT_EQUALS(UEventFd::op_mask, EPOLLIN | EPOLLRDHUP | EPOLLET)
#ifdef HAVE_ACCEPT4

View File

@ -32,6 +32,8 @@ static void usp_fork_update()
U_WARNING("usp_fork_update(): we cound't connect to db");
}
if (UOrmDriver::isPGSQL()) *psql_update << "SET synchronous_commit TO OFF";
pworld_update = U_NEW(World);
pstmt1->use( pworld_update->id);

View File

@ -97,6 +97,7 @@ bool UServer_Base::update_date;
bool UServer_Base::update_date1;
bool UServer_Base::update_date2;
bool UServer_Base::update_date3;
bool UServer_Base::called_from_handlerTime;
char UServer_Base::mod_name[2][16];
ULog* UServer_Base::log;
ULog* UServer_Base::apache_like_log;
@ -272,11 +273,13 @@ public:
// there are idle connection... (timeout)
# if defined(U_LOG_ENABLE) || (!defined(USE_LIBEVENT) && defined(HAVE_EPOLL_WAIT) && defined(DEBUG))
UServer_Base::called_from_handlerTime = true;
# endif
# ifdef U_LOG_ENABLE
if (UServer_Base::isLog())
{
UServer_Base::called_from_handlerTime = true;
# ifdef DEBUG
long delta = (u_now->tv_sec - UServer_Base::last_event) - UTimeVal::tv_sec;
@ -852,7 +855,7 @@ bool UServer_Base::checkThrottlingBeforeSend(bool bwrite)
#endif
#ifdef ENABLE_THREAD
#include <ulib/thread.h>
# include <ulib/thread.h>
class UClientThread : public UThread {
public:
@ -931,8 +934,9 @@ public:
}
}
};
# endif
# if defined(USE_LIBSSL) && !defined(OPENSSL_NO_OCSP) && defined(SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB)
# if defined(USE_LIBSSL) && !defined(OPENSSL_NO_OCSP) && defined(SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB) && !defined(_MSWINDOWS_)
# include <ulib/net/tcpsocket.h>
# include <ulib/net/client/client.h>
@ -967,12 +971,38 @@ public:
(void) U_SYSCALL(nanosleep, "%p,%p", &ts, 0);
}
}
static bool init()
{
U_TRACE_NO_PARAM(0, "UOCSPStapling::init()")
if (USSLSocket::setDataForStapling() == false) U_RETURN(false);
USSLSocket::staple.data = UServer_Base::getPointerToDataShare(USSLSocket::staple.data);
UServer_Base::setLockOCSPStaple();
U_INTERNAL_ASSERT_EQUALS(USSLSocket::staple.client, 0)
USSLSocket::staple.client = U_NEW(UClient<UTCPSocket>(0));
(void) USSLSocket::staple.client->setUrl(*USSLSocket::staple.url);
U_INTERNAL_ASSERT_EQUALS(UServer_Base::pthread_ocsp, 0)
U_NEW_ULIB_OBJECT(UServer_Base::pthread_ocsp, UOCSPStapling);
U_INTERNAL_DUMP("UServer_Base::pthread_ocsp = %p", UServer_Base::pthread_ocsp)
UServer_Base::pthread_ocsp->start(0);
U_RETURN(true);
}
};
ULock* UServer_Base::lock_ocsp_staple;
UOCSPStapling* UServer_Base::pthread_ocsp;
#endif
#endif
ULock* UServer_Base::lock_ocsp_staple;
UThread* UServer_Base::pthread_ocsp;
# endif
#endif
#ifdef U_LINUX
@ -2415,32 +2445,10 @@ void UServer_Base::init()
pthis->preallocate();
#if defined(USE_LIBSSL) && defined(ENABLE_THREAD) && !defined(OPENSSL_NO_OCSP) && defined(SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB) && !defined(_MSWINDOWS_)
if (bssl)
if (bssl &&
UOCSPStapling::init() == false)
{
if (USSLSocket::setDataForStapling() == false)
{
U_WARNING("SSL: OCSP stapling ignored, some error occured...");
}
else
{
USSLSocket::staple.data = getPointerToDataShare(USSLSocket::staple.data);
setLockOCSPStaple();
U_INTERNAL_ASSERT_EQUALS(USSLSocket::staple.client, 0)
USSLSocket::staple.client = U_NEW(UClient<UTCPSocket>(0));
(void) USSLSocket::staple.client->setUrl(*USSLSocket::staple.url);
U_INTERNAL_ASSERT_EQUALS(pthread_ocsp, 0)
U_NEW_ULIB_OBJECT(pthread_ocsp, UOCSPStapling);
U_INTERNAL_DUMP("pthread_ocsp = %p", pthread_ocsp)
pthread_ocsp->start(0);
}
U_WARNING("SSL: OCSP stapling ignored, some error occured...");
}
#endif
@ -2797,10 +2805,10 @@ loop:
if ((u_now->tv_sec - CLIENT_INDEX->last_event) >= ptime->UTimeVal::tv_sec)
{
# ifdef U_LOG_ENABLE
# if defined(U_LOG_ENABLE) || (!defined(USE_LIBEVENT) && defined(HAVE_EPOLL_WAIT) && defined(DEBUG))
called_from_handlerTime = false;
# endif
if (handlerTimeoutConnection(CLIENT_INDEX))
{
UNotifier::handlerDelete((UEventFd*)CLIENT_INDEX);
@ -3150,8 +3158,6 @@ end:
#undef CLIENT_IMAGE_HANDLER_READ
#ifdef U_LOG_ENABLE
bool UServer_Base::called_from_handlerTime;
uint32_t UServer_Base::getNumConnection(char* ptr)
{
U_TRACE(0, "UServer_Base::getNumConnection(%p)", ptr)
@ -3206,13 +3212,25 @@ bool UServer_Base::handlerTimeoutConnection(void* cimg)
}
else
{
U_INTERNAL_ASSERT_EQUALS(cimg, pClientImage)
ULog::log("%shandlerTimeoutConnection: client connected didn't send any request in %u secs (timeout), close connection %v",
ULog::log("%shandlerTimeoutConnection: client connected didn't send any request in %u secs, close connection %v",
UServer_Base::mod_name[0], last_event - ((UClientImage_Base*)cimg)->last_event, ((UClientImage_Base*)cimg)->logbuf->rep);
}
}
# endif
# if !defined(USE_LIBEVENT) && defined(HAVE_EPOLL_WAIT) && defined(DEBUG)
if (called_from_handlerTime)
{
U_WARNING("%shandlerTime: client connected didn't send any request in %u secs (timeout)", UServer_Base::mod_name[0], ptime->UTimeVal::tv_sec);
}
else
{
U_WARNING("%shandlerTimeoutConnection: client connected didn't send any request in %u secs - "
"UEventFd::fd = %d socket->iSockDesc = %d UNotifier::num_connection = %d UNotifier::min_connection = %d",
UServer_Base::mod_name[0], last_event - ((UClientImage_Base*)cimg)->last_event,
((UClientImage_Base*)cimg)->UEventFd::fd,
((UClientImage_Base*)cimg)->socket->iSockDesc, UNotifier::num_connection, UNotifier::min_connection);
}
# endif
U_RETURN(true); // NB: return true mean that we want erase the item...
}

View File

@ -493,9 +493,6 @@ loop0:
: handler_event->handlerWrite()) == U_NOTIFIER_DELETE)
{
handlerDelete(handler_event);
# ifndef U_COVERITY_FALSE_POSITIVE // Improper use of negative value (NEGATIVE_RETURNS)
handler_event->fd = -1;
# endif
}
}
@ -549,9 +546,6 @@ loop0:
: handler_event->handlerWrite()) == U_NOTIFIER_DELETE)
{
handlerDelete(handler_event);
# ifndef U_COVERITY_FALSE_POSITIVE // Improper use of negative value (NEGATIVE_RETURNS)
handler_event->fd = -1;
# endif
# if defined(U_EPOLLET_POSTPONE_STRATEGY)
if (bepollet) pevents->events = 0;
@ -607,9 +601,6 @@ loop2: if (pevents->events)
if (handler_event->handlerRead() == U_NOTIFIER_DELETE)
{
handlerDelete(handler_event);
# ifndef U_COVERITY_FALSE_POSITIVE // Improper use of negative value (NEGATIVE_RETURNS)
handler_event->fd = -1;
# endif
pevents->events = 0;
}

View File

@ -1040,9 +1040,9 @@ void UHTTP2::openStream()
U_INTERNAL_ASSERT_POINTER(pStream)
U_INTERNAL_ASSERT(pConnection->max_open_stream_id <= frame.stream_id)
pStream->out_window =
pConnection->out_window = settings.initial_window_size; // sender flow control window
pStream->inp_window =
// pStream->out_window =
// pConnection->out_window = settings.initial_window_size; // sender flow control window
// pStream->inp_window =
pConnection->inp_window = pConnection->peer_settings.initial_window_size; // receiver flow control window
pStream->id =
@ -1052,7 +1052,7 @@ void UHTTP2::openStream()
pStream->state = ((frame.flags & FLAG_END_STREAM) != 0 ? STREAM_STATE_HALF_CLOSED : STREAM_STATE_OPEN);
U_INTERNAL_DUMP("pStream->id = %d pStream->state = %d pStream->inp_window = %d", pStream->id, pStream->state, pStream->inp_window)
U_INTERNAL_DUMP("pStream->id = %d pStream->state = %d", pStream->id, pStream->state)
}
void UHTTP2::readFrame()
@ -1164,8 +1164,8 @@ loop:
}
# endif
if (frame.stream_id) pStream->out_window += window_size_increment;
else pConnection->out_window += window_size_increment;
// if (frame.stream_id) pStream->out_window += window_size_increment;
// else pConnection->out_window += window_size_increment;
goto loop;
}
@ -1302,9 +1302,9 @@ void UHTTP2::manageHeaders()
if ((frame.flags & FLAG_PRIORITY) == 0)
{
pStream->priority_exclusive = false;
pStream->priority_dependency = 0;
pStream->priority_weight = 0;
// pStream->priority_exclusive = false;
// pStream->priority_dependency = 0;
// pStream->priority_weight = 0;
}
else
{
@ -1317,12 +1317,12 @@ void UHTTP2::manageHeaders()
}
# endif
uint32_t u4 = ntohl(*(uint32_t*)ptr);
// uint32_t u4 = ntohl(*(uint32_t*)ptr);
ptr += 4;
pStream->priority_exclusive = (u4 >> 31) != 0;
pStream->priority_dependency = u4 & 0x7fffffff;
pStream->priority_weight = (uint16_t)*ptr++ + 1;
// pStream->priority_exclusive = (u4 >> 31) != 0;
// pStream->priority_dependency = u4 & 0x7fffffff;
// pStream->priority_weight = (uint16_t)*ptr++ + 1;
}
if ((frame.flags & FLAG_END_HEADERS) != 0) decodeHeaders(ptr, endptr); // parse header block fragment
@ -1970,7 +1970,7 @@ const char* UHTTP2::getFrameTypeDescription(char type)
U_EXPORT const char* UHTTP2::Connection::dump(bool reset) const
{
*UObjectIO::os << "state " << state << '\n'
<< "out_window " << out_window << '\n'
// << "out_window " << out_window << '\n'
<< "inp_window " << inp_window << '\n'
<< "hpack_max_capacity " << hpack_max_capacity << '\n'
<< "max_open_stream_id " << max_open_stream_id << '\n'

View File

@ -32,6 +32,8 @@ static void usp_fork_update()
U_WARNING("usp_fork_update(): we cound't connect to db");
}
if (UOrmDriver::isPGSQL()) *psql_update << "SET synchronous_commit TO OFF";
pworld_update = U_NEW(World);
pstmt1->use( pworld_update->id);