Skip to content

Commit

Permalink
sync
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanocasazza committed Nov 26, 2012
1 parent ecdcd84 commit 8ae102f
Show file tree
Hide file tree
Showing 116 changed files with 2,219 additions and 4,606 deletions.
3 changes: 1 addition & 2 deletions Makefile.am
Expand Up @@ -41,8 +41,7 @@ dist-hook:
$(distdir)/tests/examples/WAGSM/log \
$(distdir)/tests/examples/CApath/*.*0 \
$(distdir)/tests/examples/TSA/log \
$(distdir)/tests/examples/TSA/DB/log \
$(distdir)/tests/examples/TSA/DB/.rnd \
$(distdir)/tests/examples/TSA/TSA/.rnd \
$(distdir)/tests/examples/TSA/response/* \
$(distdir)/tests/examples/www.sito1.com \
$(distdir)/tests/examples/CSP/DB_CA/CA* \
Expand Down
3 changes: 1 addition & 2 deletions Makefile.in
Expand Up @@ -937,8 +937,7 @@ dist-hook:
$(distdir)/tests/examples/WAGSM/log \
$(distdir)/tests/examples/CApath/*.*0 \
$(distdir)/tests/examples/TSA/log \
$(distdir)/tests/examples/TSA/DB/log \
$(distdir)/tests/examples/TSA/DB/.rnd \
$(distdir)/tests/examples/TSA/TSA/.rnd \
$(distdir)/tests/examples/TSA/response/* \
$(distdir)/tests/examples/www.sito1.com \
$(distdir)/tests/examples/CSP/DB_CA/CA* \
Expand Down
20 changes: 20 additions & 0 deletions configure
Expand Up @@ -944,6 +944,7 @@ enable_HIS
enable_HCRS
enable_HUPS
enable_CRPWS
enable_thread_approach
enable_pch
enable_coverage
enable_gcc_optimized
Expand Down Expand Up @@ -1629,6 +1630,7 @@ Optional Features:
--enable-HCRS enable HTTP Cache Request Support [default=yes]
--enable-HUPS enable HTTP Upload Progress Support [default=no]
--enable-CRPWS enable Client Response Partial Write Support [default=no]
--enable-thread-approach enable server thread approach support [default=no]
--enable-pch enables precompiled header support (currently only gcc >= 3.4) [default=no]
--enable-coverage enable coverage [default=no]
--enable-gcc-optimized compile with GCC optimizations flags enabled (-finline,-fstrict-aliasing,...) [default=yes]
Expand Down Expand Up @@ -20933,6 +20935,24 @@ $as_echo "#define U_CLIENT_RESPONSE_PARTIAL_WRITE_SUPPORT 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_CRPWS" >&5
$as_echo "$enable_CRPWS" >&6; }

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want to enable server thread approach support" >&5
$as_echo_n "checking if you want to enable server thread approach support... " >&6; }
# Check whether --enable-thread-approach was given.
if test "${enable_thread_approach+set}" = set; then :
enableval=$enable_thread_approach;
fi

if test -z "$enable_thread_approach" ; then
enable_thread_approach="no"
fi
if test "$enable_thread_approach" = "yes"; then

$as_echo "#define U_SERVER_THREAD_APPROACH_SUPPORT 1" >>confdefs.h

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_approach" >&5
$as_echo "$enable_thread_approach" >&6; }

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want to enable use of precompiled headers" >&5
$as_echo_n "checking if you want to enable use of precompiled headers... " >&6; }
# Check whether --enable-pch was given.
Expand Down
24 changes: 17 additions & 7 deletions examples/WiAuth/wi_auth.cpp
Expand Up @@ -241,17 +241,27 @@
The latitude and longitude attributes are geographic coordinates specified in decimal degrees.
The altitude attribute denotes the height of the position, specified in meters above the [WGS84] ellipsoid. If the implementation cannot provide altitude information, the value of this attribute must be null.
The altitude attribute denotes the height of the position, specified in meters above the [WGS84] ellipsoid.
If the implementation cannot provide altitude information, the value of this attribute must be null.
The accuracy attribute denotes the accuracy level of the latitude and longitude coordinates. It is specified in meters and must be supported by all implementations. The value of the accuracy attribute must be a non-negative real number.
The accuracy attribute denotes the accuracy level of the latitude and longitude coordinates. It is specified
in meters and must be supported by all implementations. The value of the accuracy attribute must be a non-negative
real number.
The altitudeAccuracy attribute is specified in meters. If the implementation cannot provide altitude information, the value of this attribute must be null. Otherwise, the value of the altitudeAccuracy attribute must be a non-negative real number.
The altitudeAccuracy attribute is specified in meters. If the implementation cannot provide altitude information,
the value of this attribute must be null. Otherwise, the value of the altitudeAccuracy attribute must be a non-negative
real number.
The accuracy and altitudeAccuracy values returned by an implementation should correspond to a 95% confidence level.
The heading attribute denotes the direction of travel of the hosting device and is specified in degrees, where 0° ≤ heading < 360°, counting clockwise relative to the true north. If the implementation cannot provide heading information, the value of this attribute must be null. If the hosting device is stationary (i.e. the value of the speed attribute is 0), then the value of the heading attribute must be NaN.
The heading attribute denotes the direction of travel of the hosting device and is specified in degrees, where 0° ≤ heading < 360°,
counting clockwise relative to the true north. If the implementation cannot provide heading information, the value of this attribute
must be null. If the hosting device is stationary (i.e. the value of the speed attribute is 0), then the value of the heading attribute
must be NaN.
The speed attribute denotes the magnitude of the horizontal component of the hosting device's current velocity and is specified in meters per second. If the implementation cannot provide speed information, the value of this attribute must be null. Otherwise, the value of the speed attribute must be a non-negative real number.
The speed attribute denotes the magnitude of the horizontal component of the hosting device's current velocity and is specified in meters
per second. If the implementation cannot provide speed information, the value of this attribute must be null. Otherwise, the value of the
speed attribute must be a non-negative real number.
};
*/

Expand Down Expand Up @@ -1247,8 +1257,8 @@
U_INTERNAL_ASSERT_POINTER(U_LOCK_USER1)
U_INTERNAL_ASSERT_POINTER(U_LOCK_USER2)

UString pathdb_ap = U_STRING_FROM_CONSTANT(U_LIBEXECDIR "/WiAuthAccessPoint.cdb"),
pathdb_user = U_STRING_FROM_CONSTANT(U_LIBEXECDIR "/WiAuthUser.cdb");
UString pathdb_ap = U_STRING_FROM_CONSTANT("../db/WiAuthAccessPoint.cdb"),
pathdb_user = U_STRING_FROM_CONSTANT("../db/WiAuthUser.cdb");

db_ap = U_NEW(URDB(pathdb_ap, false));
db_user = U_NEW(URDB(pathdb_user, false));
Expand Down
24 changes: 17 additions & 7 deletions examples/WiAuth/wi_auth.usp
Expand Up @@ -238,17 +238,27 @@ interface Coordinates {

The latitude and longitude attributes are geographic coordinates specified in decimal degrees.

The altitude attribute denotes the height of the position, specified in meters above the [WGS84] ellipsoid. If the implementation cannot provide altitude information, the value of this attribute must be null.
The altitude attribute denotes the height of the position, specified in meters above the [WGS84] ellipsoid.
If the implementation cannot provide altitude information, the value of this attribute must be null.

The accuracy attribute denotes the accuracy level of the latitude and longitude coordinates. It is specified in meters and must be supported by all implementations. The value of the accuracy attribute must be a non-negative real number.
The accuracy attribute denotes the accuracy level of the latitude and longitude coordinates. It is specified
in meters and must be supported by all implementations. The value of the accuracy attribute must be a non-negative
real number.

The altitudeAccuracy attribute is specified in meters. If the implementation cannot provide altitude information, the value of this attribute must be null. Otherwise, the value of the altitudeAccuracy attribute must be a non-negative real number.
The altitudeAccuracy attribute is specified in meters. If the implementation cannot provide altitude information,
the value of this attribute must be null. Otherwise, the value of the altitudeAccuracy attribute must be a non-negative
real number.

The accuracy and altitudeAccuracy values returned by an implementation should correspond to a 95% confidence level.

The heading attribute denotes the direction of travel of the hosting device and is specified in degrees, where 0° ≤ heading < 360°, counting clockwise relative to the true north. If the implementation cannot provide heading information, the value of this attribute must be null. If the hosting device is stationary (i.e. the value of the speed attribute is 0), then the value of the heading attribute must be NaN.
The heading attribute denotes the direction of travel of the hosting device and is specified in degrees, where 0° ≤ heading < 360°,
counting clockwise relative to the true north. If the implementation cannot provide heading information, the value of this attribute
must be null. If the hosting device is stationary (i.e. the value of the speed attribute is 0), then the value of the heading attribute
must be NaN.

The speed attribute denotes the magnitude of the horizontal component of the hosting device's current velocity and is specified in meters per second. If the implementation cannot provide speed information, the value of this attribute must be null. Otherwise, the value of the speed attribute must be a non-negative real number.
The speed attribute denotes the magnitude of the horizontal component of the hosting device's current velocity and is specified in meters
per second. If the implementation cannot provide speed information, the value of this attribute must be null. Otherwise, the value of the
speed attribute must be a non-negative real number.
};
*/

Expand Down Expand Up @@ -1244,8 +1254,8 @@ static void usp_init()
U_INTERNAL_ASSERT_POINTER(U_LOCK_USER1)
U_INTERNAL_ASSERT_POINTER(U_LOCK_USER2)

UString pathdb_ap = U_STRING_FROM_CONSTANT(U_LIBEXECDIR "/WiAuthAccessPoint.cdb"),
pathdb_user = U_STRING_FROM_CONSTANT(U_LIBEXECDIR "/WiAuthUser.cdb");
UString pathdb_ap = U_STRING_FROM_CONSTANT("../db/WiAuthAccessPoint.cdb"),
pathdb_user = U_STRING_FROM_CONSTANT("../db/WiAuthUser.cdb");

db_ap = U_NEW(URDB(pathdb_ap, false));
db_user = U_NEW(URDB(pathdb_user, false));
Expand Down
5 changes: 2 additions & 3 deletions examples/userver/userver.cfg.default
Expand Up @@ -67,14 +67,14 @@ userver {
# SOCKET_NAME tmp/socket
# IP_ADDRESS 10.30.1.131
# ALLOWED_IP 127.0.0.1,10.30.0.0/16
#
# ENABLE_RFC1918_FILTER yes
# ALLOWED_IP_PRIVATE 127.0.0.1,10.30.0.0/16

LISTEN_BACKLOG 1024
SET_REALTIME_PRIORITY yes

PID_FILE /var/run/userver.pid
# PID_FILE /var/run/userver.pid
# WELCOME_MSG "220 david.unirel.intranet ULib WEB server (Version 1.1.0) ready.\n"
# RUN_AS_USER apache
DOCUMENT_ROOT /var/www/localhost/htdocs
Expand All @@ -83,7 +83,6 @@ userver {
# LOG_FILE_SZ 1M
# LOG_MSG_SIZE -1

PLUGIN mod_http
# PLUGIN "mod_tsa mod_http"
# PLUGIN "mod_rpc mod_http"
# PLUGIN "mod_soap mod_http"
Expand Down
15 changes: 12 additions & 3 deletions include/ulib/container/vector.h
Expand Up @@ -30,6 +30,7 @@ template <class T> class UVector;

template <> class U_EXPORT UVector<void*> {
public:

// Check for memory error
U_MEMORY_TEST

Expand Down Expand Up @@ -881,8 +882,11 @@ template <> class U_EXPORT UVector<UString> : public UVector<UStringRep*> {

// STACK OPERATIONS

void push( UStringRep* rep) { UVector<UStringRep*>::push(rep); }
void push_back(UStringRep* rep) { UVector<UStringRep*>::push(rep); }
void push( UStringRep* rep) { UVector<UStringRep*>::push(rep); }
void push_back(UStringRep* rep) { UVector<UStringRep*>::push(rep); }

void push( const char* str, uint32_t len) { push(UStringRep::create(str, len, 0)); }
void push_back(const char* str, uint32_t len) { push(UStringRep::create(str, len, 0)); }

void push( const UString& str);
void push_back(const UString& str) { push(str); } // add to end
Expand Down Expand Up @@ -1097,6 +1101,11 @@ template <> class U_EXPORT UVector<UString> : public UVector<UStringRep*> {

uint32_t intersection(UVector<UString>& set1, UVector<UString>& set2);

// OPERATOR

bool operator==(const UVector<UString>& v) const __pure;
bool operator!=(const UVector<UString>& v) const { return ! operator==(v); }

// STREAMS

uint32_t readline( istream& is);
Expand All @@ -1115,7 +1124,7 @@ template <> class U_EXPORT UVector<UString> : public UVector<UStringRep*> {
static void mksort(UStringRep** a, int n, int depth);
bool _isEqual(UVector<UString>& vec, bool ignore_case);

// uint32_t findWithDataOffset(const char* s, uint32_t n, uint32_t offset = 0) __pure;
// uint32_t findWithDataOffset(const char* s, uint32_t n, uint32_t offset = 0) __pure;

UVector<UString>(const UVector<UString>&) : UVector<UStringRep*>() {}
UVector<UString>& operator=(const UVector<UString>&) { return *this; }
Expand Down
1 change: 1 addition & 0 deletions include/ulib/event/event_time.h
Expand Up @@ -59,6 +59,7 @@ class U_EXPORT UEventTime : public UTimeVal {

void setCurrentTime();
bool isOld() const __pure;
bool isExpired() const __pure;
void setTimerVal(struct timeval* it_value);

time_t expire() { return (ctime.tv_sec + tv_sec); }
Expand Down
3 changes: 3 additions & 0 deletions include/ulib/internal/config.h.in
Expand Up @@ -958,6 +958,9 @@ typedef unsigned long long uint64;
/* install directory */
#undef U_PREFIXDIR

/* enable server thread approach support */
#undef U_SERVER_THREAD_APPROACH_SUPPORT

/* STATIC_HANDLER_ECHO */
#undef U_STATIC_HANDLER_ECHO

Expand Down
9 changes: 1 addition & 8 deletions include/ulib/net/server/plugin/mod_http.h
Expand Up @@ -69,14 +69,7 @@ class U_EXPORT UHttpPlugIn : public UServerPlugIn, UEventFd {
// define method VIRTUAL of class UEventFd

virtual int handlerRead();
virtual void handlerDelete()
{
U_TRACE(0, "UHttpPlugIn::handlerDelete()")

U_INTERNAL_DUMP("UEventFd::fd = %d", UEventFd::fd)

UEventFd::fd = 0;
}
virtual void handlerDelete();

// DEBUG

Expand Down

0 comments on commit 8ae102f

Please sign in to comment.