afmongodb: Mark host() and port() obsolete

The host() and port() options should have been marked obsolete a while
ago, fix that now, and suggest using servers() instead. This fixes #92.

Reported-by: Andras Mitzki <micek@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
value-pairs: replace trash stack with own stack implementation

Because of the g_trash_stack and its usage problems could arise when
the strict-aliasing compile option was set leading to bad value-pairs
expansion. With the own implementation the bogous usage of g_trash_stack
is supposed to be eliminated.

Signed-off-by: Daniel Gados <gdani@balabit.hu>
Merge pull request #104 from algernon/f/mongodb/obsolete-keys

afmongodb: Mark host() and port() obsolete
Merge pull request #106 from gdani/f/value_pairs_bugfix

value-pairs: replace trash stack with own stack implementation
afamqp: Make the username() and password() options mandatory

For the destination to work, we need both username() and password()
supplied, otherwise the underlying library will crash. If either of
those is unset, fail the driver initialization. This fixes #80.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
afmongodb: Update the internal libmongo-client version

We need a new version of the internal libmongo-client, to fix an issue
with safe mode. This fixes #95.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
Merge pull request #107 from algernon/h/amqp/userpass-mandatory

afamqp: Make the username() and password() options mandatory
Merge pull request #108 from algernon/h/mongodb/libmongo-client-update

afmongodb: Update the internal libmongo-client version
value-pairs: the DATE should always contain the stamp time

Formerly it contained sometimes the stamp time and sometimes the
received time. From now it will always contain the stamp time.

Signed-off-by: Daniel Gados <gdani@balabit.hu>
value-pairs: adding sdata to the syslog-proto (RFC5424) scope

Signed-off-by: Daniel Gados <gdani@balabit.hu>
value-pairs: the key option of value-pairs is expanded to macros

Formerly it was expaned only to nvtable entries, but from now it
expands to macros as well without setting the scope.

Signed-off-by: Daniel Gados <gdani@balabit.hu>
format-json: fixing that the SEQNUM macro does not expand

Signed-off-by: Daniel Gados <gdani@balabit.hu>
afinter: Added internal queue length statistics

It can really help cases, when internal() driver is not used, and internal
queue starts to queue up. The best would be not posting when no internal()
is present, and this change whould be rather trivial, but I thought there
is a reason why we work like this, so I didn't change that.

Signed-off-by: Tusa Viktor <tusavik@gmail.com>
Merge pull request #110 from gdani/f/value_pairs_bugfix

value pairs bugfixes
Merge pull request #113 from talien/f/internal-queue-length-stats

afinter: Added internal queue length statistics
value-pairs: Split name before try to unwind the VP stack.

Splitting the name sets up the stack properly, so we can
unwind it afterwards. Added unit tests too.

Signed-off-by: Viktor Tusa <tusa@balabit.hu>
value-pairs: Fixed a memory leak in value-pairs.

We should free the elements of the GPtrArray too, not just the GPtrArray.

Signed-off-by: Viktor Tusa <tusa@balabit.hu>
value-pairs: Value pairs functions should honour time zone mode.

Time zone mode specifies if we should use the local timezone or the send
timezone when formatting time related macros. Value-pairs foreach/walk
functions also can format time related macros, so we should propagate
the time zone mode down to these functions, instead of wiring LTZ_LOCAL.

Signed-off-by: Viktor Tusa <tusa@balabit.hu>
Merge pull request #112 from talien/f/value-pairs-fixes

Various value pairs-related fixes.
basicfuncs: Handle empty environment variables when using $(env)

When using the $(env) template function, if the environment variable is
empty or non-existent, don't try to add a NULL string to the result.
This fixes a Glib warning, which, under some cases, would turn into a
crash. (Fixes BugZilla#277)

Reported-by: Nick Alcock <nix@esperi.org.uk>
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>