22 Commits

Author SHA1 Message Date
PascalWithopf
29c9fb1f9a codestyle: reduce line length to 120
lines are still checked for a length of 125 because
these are just some of the lines
2017-12-21 17:09:32 +01:00
Rainer Gerhards
5b4192519a omelasticsearch: fix memory leak and potential misadressing
Commit 96b5fce introduced regressions, leading to potential misadressing
and a very probable memory leak. This commit fixes the issues and
hardens the module to better detect some error cases in the
future.

It also adds valgrind-based testbench tests which ensure that no
pointer errors exist. If they had been in place, the regressions
would never have been undetected.

Note that commit 96b5fce was introduced in 8.23.0 on Nov, 15th 2016.

Many thanks to Yaroslav Bo for alerting me on the root problem and
providing a very good analysis and guidance.

see also https://github.com/rsyslog/rsyslog/issues/1906
closes https://github.com/rsyslog/rsyslog/issues/1962
see also https://github.com/rsyslog/rsyslog/issues/1964
2017-11-12 12:12:32 +01:00
Rainer Gerhards
44f035a263 core: improve object type assertion macro
now invalid object type is explicitely given in error
message
2017-06-27 08:07:15 +02:00
purnima
d45daa2af0 Rebase,redefine msgDestruct() as smsg_t is used 2016-11-22 14:24:25 +05:30
Rainer Gerhards
5e3b075d53 fix compiler warnings 2016-06-02 12:08:55 +02:00
Rainer Gerhards
d22375fa10 cleanup: always generate prototype for objDestruct()
We generate a prototype in any case, as this does not hurt but
many modules otherwise seem to miss one, which generates compiler
warnings.
2016-06-02 10:22:01 +02:00
Rainer Gerhards
887fcfac9e fix missing prototypes in config system 2016-06-01 10:32:29 +02:00
Rainer Gerhards
d30c96ad00 fix missing prototype for *QueryInterface functions 2016-06-01 09:49:46 +02:00
Rainer Gerhards
55d222543f optimize: permit cancel during object destruction
1) usually, no cancellation happens
2) even if so, there is no cancellation point inside the
   destructors, so disabeling cancellation was mood in the first
   place...
2013-01-14 11:50:13 +01:00
Rainer Gerhards
f6dea36394 runtime license change 2012-01-16 12:39:01 +01:00
Rainer Gerhards
aaffc4281e introduced a new way of handling the RcvFrom property
... plus a fix for a long-time bug in obj-types.h. That lead to
the object pointer only then to become NULL when the object was
actually destructed, I discovered this issue during
introduction of the pRcvFrom property in msg_t, but it potentially had other
effects, too. I am not sure if some experienced instability resulted from this
bug OR if its fix will cause harm to so-far "correctly" running code. The later
may very well be. Thus I will change it only for the current branch and also
the beta, but not in all old builds. Let's see how things evolve.
2009-06-30 18:45:41 +02:00
Rainer Gerhards
98348ae03d Merge branch 'master' into omfile
Conflicts:
	ChangeLog
	runtime/msg.h
	tcps_sess.c
	tcpsrv.c
	tools/syslogd.c
2009-06-16 12:59:55 +02:00
Rainer Gerhards
015d17ca70 some performance optimizations
- saved gettimeofday() calls in imtcp (and increased reception buffer)
- somewhat optimized stringbuf.c
- some other optimizations
2009-06-16 08:46:45 +02:00
Rainer Gerhards
6f4e3c4e4c restructered code in perparation for multiple rule set support
... this was long overdue, and I finlly tackeld it. It turned out to
be more complex than I initially thought. The next step now probably is
to actually implement multiple rule sets and the beauty that comes
with them.
2009-06-10 16:49:14 +02:00
Rainer Gerhards
d451808236 reduced number of compile warnings in -pedantic gcc mode 2008-06-27 10:10:47 +02:00
Rainer Gerhards
75cf92117c made gtls server driver work in plain tcp mode 2008-04-25 12:54:59 +02:00
Rainer Gerhards
bf3d2c1b39 message reception via TCP work again
... at least in some cases ;) I assume there are still a couple
of bugs inside the code. But at least we have something from
where we can continue to work on.
2008-04-24 09:57:43 +02:00
Rainer Gerhards
22ad77a627 fixed abort on rsyslogd termination 2008-04-18 12:20:02 +02:00
Rainer Gerhards
1daf8d492f converted netstrm into generic netstrm and the nsd_pctp driver 2008-04-18 11:40:15 +02:00
Rainer Gerhards
e16a207726 moved "bDropMalPTRMsgs" variable to global data pool 2008-04-17 09:40:41 +02:00
Rainer Gerhards
87c936ab65 modularization work
cleanup + created an abstract class for global data
items and moved glblGetWorkDir to it
2008-04-17 09:07:12 +02:00
Rainer Gerhards
8f8f65abb6 moved files to the runtime
there are still some files left which could go into the
runtime, but I think we will delete most of them once we
are done with the full modularization.
2008-04-16 10:26:54 +02:00