31 Commits

Author SHA1 Message Date
Rainer Gerhards
4cc2db490a bugfixes: potential problems in out file zip writer.
Problems could lead to abort and/or memory leak. The module is now hardened in a very
conservative way, which is sub-optimal from a performance point of view. This should
be improved if it has proven reliable in practice.
2009-09-22 14:07:25 +02:00
Rainer Gerhards
92b4f6d610 fixed some minor portability issues 2009-09-14 15:39:16 +02:00
Rainer Gerhards
9bb9181572 very minor cleanup 2009-08-18 19:08:44 +02:00
Rainer Gerhards
bfc3eaf23c bugfix: potential segfault in output file writer (omfile)
In async write mode, we use modular arithmetic to index the output
buffer array. However, the counter variables accidently were signed,
thus resulting in negative indizes after integer overflow. That in turn
could lead to segfaults, but was depending on the memory layout of
the instance in question (which in turn depended on a number of
variables, like compile settings but also configuration). The counters
are now unsigned (as they always should have been) and so the dangling
mis-indexing does no longer happen. This bug potentially affected all
installations, even if only some may actually have seen a segfault.
2009-08-18 18:48:18 +02:00
Rainer Gerhards
1d0806b9e3 calls to prctl() need to be based on configure results (cross-platform issue)
This is for another prctl() call, not present in the beta version (looks like it
would make sense to stick these into a utility function)
2009-07-16 13:51:52 +02:00
Rainer Gerhards
5221a1e42e added capability to write incomplete buffers after an inactivity timeout
for the stream class and thus finally activating omfile's timeout
capability in a useful way without polling and too-high performance
overhead.
2009-07-07 18:33:00 +02:00
Rainer Gerhards
26227091fa fixed a bug introduced today that lead to an abort in queue disk mode 2009-07-07 17:18:51 +02:00
Rainer Gerhards
f53aa966e1 solved a race condition 2009-07-07 12:09:41 +02:00
Rainer Gerhards
53aa68fc7d clean solution for "writing" arbrietary-size user buffers to a stream 2009-07-07 09:16:14 +02:00
Rainer Gerhards
4e9deb5b88 stream now uses a singular buffer strucuture for writing 2009-07-07 08:33:22 +02:00
Rainer Gerhards
f27b5cc253 moved locking primitives 2009-07-07 08:08:22 +02:00
Rainer Gerhards
53b055b6aa moved zip part to writer thread
... this is necessary in preparation for the final solution (we need
to have a "unified" writer). If it causes worse performance to have the
zip writher togehter with the synchronous write, we may do an async write...
2009-07-06 19:44:53 +02:00
Rainer Gerhards
8e76a0521b some minor cleanup 2009-07-06 19:28:22 +02:00
Rainer Gerhards
e3040285db first shot at asynchronous stream writer with timeout capability
... seems to work on quick testing, but needs a far more testing
and improvement. Good milestone commit.
2009-07-06 16:38:09 +02:00
Rainer Gerhards
b1f2e53921 prevented unneccessary apc calls 2009-06-23 15:17:55 +02:00
Rainer Gerhards
d2d54013ae going forward in moving string-handling functions to new interface... 2009-06-17 15:22:13 +02:00
Rainer Gerhards
6f0db63e9b milestone: input-side multiSubmit capability
... commit before I try to touch the queue side ;)
2009-06-16 15:13:47 +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
f7579e68a6 done various optimizations to the stringbuf and its users 2009-06-16 11:36:05 +02:00
Rainer Gerhards
16ecb90c3a omfile buffers are now synchronized after inactivity
This is the first shot at this functionality. Currently, we run off a fixed
counter in the rsyslogd mainloop, which needs to be restructured. But this
code works, so it is a good time for a commit.
2009-06-15 13:44:51 +02:00
Rainer Gerhards
e3d9843c85 re-enabled pipe, tty and console in omfile
... by moving code to stream.c. Thanks to the new design, new cases are
not really needed, resulting in cleaner code.

I also did a cleanup of header file usage as a side-activity.
2009-06-12 11:47:00 +02:00
Rainer Gerhards
0917edf26d re-enabled outchannel functionality 2009-06-12 09:47:44 +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
8d1e2e496c improved error handling and added fsync() support
... restoring missing functionality after the restructuring of imfile. As
a side-effect, this also lays the foundation for even more reliable queue
engine operations (but this is not yet done).
2009-06-08 18:39:06 +02:00
Rainer Gerhards
76da7f9f4e added $OMFileIOBufferSize config directive and plumbing 2009-06-04 15:59:37 +02:00
Rainer Gerhards
f2800ba261 modified stream class and omfile to work with it
now some basic operations are carried out via the stream class.
2009-06-04 15:10:24 +02:00
Rainer Gerhards
9e434f19a9 cleaned up stream class ...
... and also made it callable via an rsyslog interface rather then
relying on the OS loader (important if we go for using it inside
loadbale modules, which we soon possible will)
2009-06-04 12:15:59 +02:00
Rainer Gerhards
d451808236 reduced number of compile warnings in -pedantic gcc mode 2008-06-27 10:10:47 +02:00
Rainer Gerhards
60309004df completed better modularity of runtime
- added the ability to specify an error log function for the
  runtime
- removed dependency of core runtime on dirty.h

Note that it is "better" modularity, not perfect. There is still
work to do, but I think we can for the time being proceed with
other things.
2008-04-17 12:46:57 +02:00
Rainer Gerhards
d9b0c77d3e some more cleanup
reduced dependencies, moved non-runtime files to its own directory except
for some whom's status is unclear
2008-04-16 15:27:53 +02:00
Rainer Gerhards
3af28bbd2d moved runtime files into their own directory 2008-04-16 08:56:48 +02:00