summaryrefslogtreecommitdiff
path: root/lib/zlog_5424.c
AgeCommit message (Collapse)Author
2023-09-20lib: straight return on error on log open failDavid Lamparter
I think I originally had some other code at the tail end of that function, but that's not the case anymore, and dropping out of the function with a straight "return -1" is more useful than trucking on with an invalid fd. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-09-20lib: add dup() error check in logging codeDavid Lamparter
Mostly to make coverity happy, if dup() fails we're f*cked already. (Still useful to have a better error message...) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-03-24*: Convert event.h to frrevent.hDonald Sharp
We should probably prevent any type of namespace collision with something else. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert THREAD_XXX macros to EVENT_XXX macrosDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert thread_cancelXXX to event_cancelXXXDonald Sharp
Modify the code base so that thread_cancel becomes event_cancel Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert thread_add_XXX functions to event_add_XXXDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Rename `struct thread` to `struct event`Donald Sharp
Effectively a massive search and replace of `struct thread` to `struct event`. Using the term `thread` gives people the thought that this event system is a pthread when it is not Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Rename thread.[ch] to event.[ch]Donald Sharp
This is a first in a series of commits, whose goal is to rename the thread system in FRR to an event system. There is a continual problem where people are confusing `struct thread` with a true pthread. In reality, our entire thread.c is an event system. In this commit rename the thread.[ch] files to event.[ch]. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-02-09*: auto-convert to SPDX License IDsDavid Lamparter
Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-01-17lib: fix gmtime_assafe potential issuesRafael Zalamena
Changes: - Convert `unsigned int` to `time_t` to satisfy time truncation warnings even though at this point we had already used the modulus operator. - Avoid trying to access outside the bounds of the array `months` array has a size of 13 elements, but the code inside the loop uses `i + 1` to peek on the next month. Found by Coverity Scan (CID 1519752 and 1519769) Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2022-02-23*: Change thread->func to return void instead of intDonald Sharp
The int return value is never used. Modify the code base to just return a void instead. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-01-17lib: RFC5424 & journald extended syslog targetDavid Lamparter
Not much to say here, user docs are coming up in a separate commit. RFC5424 and (systemd's) journald allow passing structured key-value data. This stuffs the metadata we have available into there. The "does the system syslogd support RFC5424" question is unfortunately not easily answered, so we can only give an affirmative answer on NetBSD 5.0+ or FreeBSD 12+. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>