prez in mantra

Fixed compile with gcc 4.7.x…
Fixed compile with gcc 4.7.x

Added more commandline parameters.
Added more commandline parameters.

    • -20
    • +113
    /trunk/Mantra-I/src/mantra.cpp
Fixed to make it work with different container types.
Fixed to make it work with different container types.

AAdded custom_program_options - this re-implements something from mantra.old.…
AAdded custom_program_options - this re-implements something from mantra.old.

This allows for custom validators (conversion from string -> type) and for

custom checkers (verify certain rules on paramaters, eg. power of 2).

    • -0
    • +392
    /trunk/Mantra-I/mantra/utils/custom_program_options.h
    • -20
    • +149
    /trunk/Mantra-I/mantra/utils/rx.h
Converted majority of Mantra to using tr1 code instead of boost.…
Converted majority of Mantra to using tr1 code instead of boost.

Next step will be to change #include <tr1/X> to just #include <X> for C++11.

    • -2
    • +23
    /trunk/Mantra-I/build/MantraDeps.cmake
    • -2
    • +41
    /trunk/Mantra-I/build/MantraFuncs.cmake
    • -15
    • +15
    /trunk/Mantra-I/mantra/admin/accepting_session.h
    • -43
    • +42
    /trunk/Mantra-I/mantra/admin/command.h
    • -11
    • +11
    /trunk/Mantra-I/mantra/admin/console_session.h
    • -42
    • +42
    /trunk/Mantra-I/mantra/admin/editline_session.h
    • -37
    • +36
    /trunk/Mantra-I/mantra/admin/login.h
    • -13
    • +13
    /trunk/Mantra-I/mantra/admin/param_extractor.h
    • -43
    • +43
    /trunk/Mantra-I/mantra/admin/properties.h
    • -184
    • +184
    /trunk/Mantra-I/mantra/admin/registry_selector.h
    • -98
    • +99
    /trunk/Mantra-I/mantra/admin/selector.h
    • -36
    • +35
    /trunk/Mantra-I/mantra/admin/session.h
    • -22
    • +22
    /trunk/Mantra-I/mantra/admin/socket_session.h
  1. … 139 more files in changeset.
Fixed bug in operator= for segments.
Fixed bug in operator= for segments.

Efficiency correction, check if impl_ == in.impl_.
Efficiency correction, check if impl_ == in.impl_.

Added reference counted buffers, useful 0-copy for socket operations.
Added reference counted buffers, useful 0-copy for socket operations.

    • -0
    • +591
    /trunk/Mantra-I/mantra/utils/ref_counted_buffers.h
Added direct routing for where performance really matters more than…
Added direct routing for where performance really matters more than

flexibility of message handling. Direct routing requires:

a) That the client create their own message class derived from direct_message.

b) That any task handling said message class knows about it's lifetime charateristics.

c) That any task handling said message override do_message for direct_message.

Benchmarks show direct routing can be MUCH faster than standard routing,

(10-15 times faster in some cases), however standard messgaes are still

recommended where this kind of performance is not required or for portabiliy.

    • -71
    • +96
    /trunk/Mantra-I/mantra/scheduler/message.h
    • -6
    • +23
    /trunk/Mantra-I/mantra/scheduler/task.h
    • -10
    • +19
    /trunk/Mantra-I/src/scheduler/message.cpp
    • -2
    • +6
    /trunk/Mantra-I/src/scheduler/scheduler.cpp
    • -1
    • +39
    /trunk/Mantra-I/src/scheduler/task.cpp
Added directory for API documentation
Added directory for API documentation

    • -0
    • +0
    /trunk/Mantra-I/doc/api
Removed doc directories.
Removed doc directories.

Fixed core dump if tracing was enabled on shutdown.…
Fixed core dump if tracing was enabled on shutdown.

Also added MT_FLUSH for functions running in their own thread.

    • -0
    • +1
    /trunk/Mantra-I/src/utils/file/mmap_rwfile.cpp
Adjustments for SSL with tracing.…
Adjustments for SSL with tracing.

    • -0
    • +7
    /trunk/Mantra-I/src/utils/trace/CMakeLists.txt
Changed tracing so that it could support automatic assigning to a specific trace codetype based on the location of the code (ie. compile unit). Also went from 1 -> 16 reserved codetypes for mantra.
Changed tracing so that it could support automatic assigning to a specific trace codetype based on the location of the code (ie. compile unit). Also went from 1 -> 16 reserved codetypes for mantra.
    • -0
    • +2
    /trunk/Mantra-I/mantra/utils/trace/nibble0.h
Changed tracing so that it could support automatic assigning to a specific trace codetype based on the location of the code (ie. compile unit). Also went from 1 -> 16 reserved codetypes for mantra.
Changed tracing so that it could support automatic assigning to a specific trace codetype based on the location of the code (ie. compile unit). Also went from 1 -> 16 reserved codetypes for mantra.
    • -4
    • +14
    /trunk/Mantra-I/build/MantraFuncs.cmake
    • -1
    • +1
    /trunk/Mantra-I/mantra/admin/accepting_session.h
    • -11
    • +11
    /trunk/Mantra-I/mantra/admin/login.h
    • -10
    • +10
    /trunk/Mantra-I/mantra/admin/registry_selector.h
    • -5
    • +5
    /trunk/Mantra-I/mantra/admin/selector.h
    • -6
    • +5
    /trunk/Mantra-I/mantra/core/properties.h
  1. … 21 more files in changeset.
Added special handling for char/wchar_t * (and const versions) when logging ussing MLOGF.…
Added special handling for char/wchar_t * (and const versions) when logging ussing MLOGF.

And allowed for users to also add speical handling for any other types they deem necessary.

    • -0
    • +14
    /trunk/Mantra-I/src/core/service.cpp
Adjustmet to write PID every time.
Adjustmet to write PID every time.

Fixed test cases and depcrecated '-c' option on commandline.
Fixed test cases and depcrecated '-c' option on commandline.

    • -1
    • +1
    /trunk/Mantra-I/mantra/utils/trace/nibble1.h
    • -1
    • +1
    /trunk/Mantra-I/test/scheduler/CMakeLists.txt
    • -6
    • +10
    /trunk/Mantra-I/test/utils/CMakeLists.txt
    • -2
    • +6
    /trunk/Mantra-I/test/utils/file/CMakeLists.txt
    • -2
    • +1
    /trunk/Mantra-I/test/utils/trace/CMakeLists.txt
Changed version number.
Changed version number.

Changed trace so that autoflush is a property of the codetype (not TSS).…
Changed trace so that autoflush is a property of the codetype (not TSS).

Also changed task stopping to be a two-phase stop ('stop' and 'join').

    • -1
    • +1
    /trunk/Mantra-I/mantra/admin/accepting_session.h
    • -1
    • +2
    /trunk/Mantra-I/mantra/admin/editline_session.h
    • -2
    • +8
    /trunk/Mantra-I/mantra/scheduler/task.h
    • -3
    • +22
    /trunk/Mantra-I/mantra/utils/trace/trace.h
    • -25
    • +2
    /trunk/Mantra-I/mantra/utils/trace/tss.h
    • -8
    • +22
    /trunk/Mantra-I/src/admin/console_session.cpp
    • -3
    • +20
    /trunk/Mantra-I/src/admin/socket_session.cpp
    • -3
    • +20
    /trunk/Mantra-I/src/admin/telnet_session.cpp
    • -0
    • +198
    /trunk/Mantra-I/src/core/commands.cpp
  1. … 5 more files in changeset.
Added some additionally #defines to trace code to allow…
Added some additionally #defines to trace code to allow

third party users that use tracing to disable it entirely

from their code for unit testing and such.

    • -0
    • +4
    /trunk/Mantra-I/mantra/utils/trace/nibble0.h
    • -0
    • +4
    /trunk/Mantra-I/mantra/utils/trace/nibble1.h
    • -0
    • +4
    /trunk/Mantra-I/mantra/utils/trace/nibble2.h
    • -0
    • +4
    /trunk/Mantra-I/mantra/utils/trace/nibble3.h
    • -0
    • +12
    /trunk/Mantra-I/mantra/utils/trace/trace.h
Adjusted warnings to be a little cleaner.
Adjusted warnings to be a little cleaner.

    • -32
    • +43
    /trunk/Mantra-I/src/core/shutdown.cpp
Changed shutdown to allow for scheduling shutdowns from the config file.
Changed shutdown to allow for scheduling shutdowns from the config file.

    • -2
    • +9
    /trunk/Mantra-I/mantra/core/shutdown.h
    • -7
    • +25
    /trunk/Mantra-I/mantra/utils/duration.h
    • -3
    • +6
    /trunk/Mantra-I/src/core/application.cpp
    • -0
    • +269
    /trunk/Mantra-I/src/core/commands.cpp
    • -4
    • +63
    /trunk/Mantra-I/src/core/shutdown.cpp
Fixed bug where shutdown while telnet port is open can cause…
Fixed bug where shutdown while telnet port is open can cause

two threads to try and close socket at the same time, and one

of them will then raise an exception and cause a core.

Removed some unnecessary includes.
Removed some unnecessary includes.

    • -1
    • +0
    /trunk/Mantra-I/src/scheduler/event_task.cpp
    • -1
    • +0
    /trunk/Mantra-I/src/scheduler/task.cpp
Fixed problem where tcsetattr decides to try and write to…
Fixed problem where tcsetattr decides to try and write to

the PTY, which is not being read yet by the session (telnet

specifically). Changed it so that editline is not even

initalized until editline_session::run(), which means it is

in it's own thread, and AFTER the pty's other end is being

read by the service. This stops telnet blocking the service

handler if it only has one thread and termcap is b0rked.

    • -0
    • +1
    /trunk/Mantra-I/build/MantraDeps.cmake
    • -6
    • +25
    /trunk/Mantra-I/mantra/admin/editline_session.h
    • -72
    • +58
    /trunk/Mantra-I/src/admin/console_session.cpp
    • -18
    • +28
    /trunk/Mantra-I/src/admin/telnet_session.cpp
Fixed how socket session executes commands, and removed…
Fixed how socket session executes commands, and removed

conflict between editline and socket sessions.

    • -1
    • +1
    /trunk/Mantra-I/mantra/admin/editline_session.h
    • -3
    • +50
    /trunk/Mantra-I/src/admin/socket_session.cpp
Changes to accomodate difference between boost::filesystem v2 and v3.…
Changes to accomodate difference between boost::filesystem v2 and v3.

And also to stop an exception being thrown when tracing a closed socket.

    • -1
    • +1
    /trunk/Mantra-I/src/utils/file/saf.cpp
Changes for boost 1.46.1
Changes for boost 1.46.1

    • -1
    • +1
    /trunk/Mantra-I/mantra/admin/accepting_session.h
    • -54
    • +54
    /trunk/Mantra-I/src/core/commands.cpp
    • -1
    • +1
    /trunk/Mantra-I/src/utils/file/saf.cpp
Added dumb socket admin.…
Added dumb socket admin.

    • -0
    • +218
    /trunk/Mantra-I/mantra/admin/accepting_session.h
    • -1
    • +1
    /trunk/Mantra-I/mantra/admin/editline_session.h
    • -0
    • +237
    /trunk/Mantra-I/mantra/admin/socket_session.h
    • -0
    • +252
    /trunk/Mantra-I/mantra/admin/socket_session_impl.h
    • -138
    • +28
    /trunk/Mantra-I/mantra/admin/telnet_session.h
    • -3
    • +12
    /trunk/Mantra-I/src/admin/CMakeLists.txt
    • -0
    • +360
    /trunk/Mantra-I/src/admin/accepting_session.cpp
    • -1
    • +2
    /trunk/Mantra-I/src/admin/console_session.cpp
    • -0
    • +765
    /trunk/Mantra-I/src/admin/socket_session.cpp
    • -297
    • +15
    /trunk/Mantra-I/src/admin/telnet_session.cpp