As long as the `TypeInt` is actually a long primitive,
and we tend to switch using the long type everywhere
within xml implementation, then
there is no need to support both `int` and `long`
types, just force users to be on `long` always.
Refactor the user code accordingly.
Change-Id: I5c5b032a824a84f69f99dc7c755d0da745a9a068
As this is only a syntactic sugar there is no difference,
but from the style perspective the project tends to
use C++ style.
Change-Id: I3636c48163b3d262b272b5088e03c074e49a9ec3
Properly select the equal operator based on long instead.
Otherwise it selects the `ValueStruct` as the latest
possible from the variant based `_value` and eventually
it gets stumbled over `[]` operator for
building structs which asserts it.
Change-Id: Ib9a4fe9c66ff02554a84451df8aa940fe766fedc
Directly contain the ValueArray in the variant instead of manually
managing a pointer. Requires updating the return type of some const
functions to also be const, which in turn requires some of their users
to have the type const qualified as well.
Change-Id: I2ec31d659eef521a3f68d642ee431b5c38f27fdf
Use overloading for the various flavours of str2int functions. This has
the benefit of automatically choosing the appropriate function for
aliased types that may be one or the other underlying type, such as
size_t.
Do a mass renaming of all relevant instances.
Change-Id: I7abb6b9031ee53332d2b04a6cba4a6cc667a4807
When handling `XMLRPC2DIServer` allocation,
first make sure to have the `XmlRpcServer`
and then do rest of processing (e.g.: `di_export`,
`di_method`, `registerMethods()` etc.)
Otherwise can lead to seg.faults when appealing
to objects via still non-allocated `XmlRpcServer`
object.
Change-Id: Id3395ce3e0d6f2de76ed8caa1a786a6e139a851b
For the `XMLRPC2DIServer` class as well as for the
`XMLRPC2DI` one, heap allocated objects aren't properly
managed by destruction time.
Pointers have to be initialized as NULL, and point
only when allocation was successfull.
Then by a destruction time, check them and free.
Change-Id: I1a31813db254cc4ab0f7ecc7b382fcb3635feee0
There is only one instance of XMLRPC2DI API,
hence only one possible value for a list of
class members, such as:
- XML RPC port for DI
- XML RPC DI server
- variable, which defines, if that's configured
Additionally fixes:
Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member XMLRPCPort
is not initialized in this constructor nor in any functions that it calls.
Change-Id: I0120652220129774137e90d1ad8dfa579cca3202
It has no sense to keep it as `unsigned int`, because
it's used in comparisons with other `time_t` type
variables.
Although it's only used for now in `is_active()`.
Change-Id: Iceda2338d88ba7de38d084001bbfce03da75e452
No need to cast them into `unsigned int`,
especially using the C-style casting.
Fixes:
Use of 32-bit time_t (Y2K38_SAFETY)
store_truncates_time_t: A time_t value is stored in an integer
with too few bits to accommodate it.
The expression time(NULL) is cast to unsigned int.
Change-Id: I0b7ecb86d4941d4441c8e89ade589064693c226e
Use only references to pass parameters to constructor,
otherwise copy operation would be used instead of move.
Same for other class methods.
Fixes:
Variable copied when it could be moved (COPY_INSTEAD_OF_MOVE)
copy_constructor_call: direct_export is passed-by-value as parameter
to std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >::basic_string(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const &),
when it could be moved instead.
...
Change-Id: If4be730292b3329af1d806c8cf8292498428ea61
Fix possible memory leak during loading.
No functional change.
Fixes:
Resource leak (RESOURCE_LEAK)
leaked_storage: Variable s going
out of scope leaks the storage it points to.
Change-Id: Ibed584c7ce82056bf0d4c492d76b78584eb7ac08
max/avg calls and calls/s values, can be accessed via
get_callsmax/get_callsavg/get_cpsmax/get_cpsavg from
- stats server
- XMLRPC through xmlrpc2di
based on a patch by Robert Szokovacs rsokovacs gammatelecom hu
- result of xmlrpc client call is now not packed into extra AmArg Array
- nested arrays and structs work as expected
o added optional logging of xmlrpc server call parameters and result
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1316 8eb893ce-cfd4-0310-b710-fb5ebe64c474
XMLRPC server has been in production for quite some time and it proves
really useful, warranting a full 'apps' membership...
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1104 8eb893ce-cfd4-0310-b710-fb5ebe64c474