/* Copyright (c) 2017-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "lib-event-private.h"
#include "event-filter.h"
#include "array.h"
#include "llist.h"
#include "str.h"
#include "strescape.h"
#include "ioloop.h"
enum event_code {
};
extern const struct event_passthrough event_passthrough_vfuncs;
{
return container_of(event_last_passthrough,
struct event, event_passthrough);
}
{
}
unsigned int source_linenum)
{
}
return event;
}
struct event_passthrough *
unsigned int source_linenum)
{
if (!parent->passthrough) {
if (event_last_passthrough != NULL) {
/* API is being used in a wrong or dangerous way */
i_panic("Can't create multiple passthrough events - finish the earlier with ->event()");
}
/* This event only intends to extend the parent event.
Use the parent's creation timestamp. */
} else {
}
return event_last_passthrough;
}
static bool
{
bool ret;
T_BEGIN {
} T_END;
if (!ret) {
/* event sending was stopped */
return FALSE;
}
}
return TRUE;
}
{
return event;
}
{
/* the args are empty and not used for anything, but there doesn't seem
to be any nice and standard way of passing an initialized va_list
as a parameter without va_start(). */
}
{
return;
return;
if (last_passthrough_event() == event)
}
{
return events;
}
{
if (current_global_event != NULL) {
if (!array_is_created(&global_event_stack))
}
return event;
}
{
if (!array_is_created(&global_event_stack) ||
array_count(&global_event_stack) == 0)
else {
unsigned int event_count;
i_assert(event_count > 0);
}
return current_global_event;
}
{
return current_global_event;
}
static struct event *
{
/* allocate the first log prefix from the pool */
} else {
/* log prefix is being updated multiple times -
switch to system pool so we don't keep leaking memory */
else
}
return event;
}
struct event *
{
}
{
}
struct event *
{
return event;
}
struct event *
unsigned int linenum, bool literal_fname)
{
return event;
}
{
return event;
}
{
return *catp;
}
return NULL;
}
struct event_category *const *
{
}
{
if (category->registered)
return;
/* register parent categories first */
} T_END;
}
static bool
{
return TRUE;
}
return FALSE;
}
struct event *
struct event_category *const *categories)
{
for (unsigned int i = 0; categories[i] != NULL; i++) {
}
return event;
}
struct event *
{
}
static struct event_field *
{
return NULL;
return field;
}
return NULL;
}
const struct event_field *
{
return field;
}
const char *
{
return NULL;
switch (field->value_type) {
}
i_unreached();
}
static struct event_field *
{
}
return field;
}
struct event *
{
return event;
}
struct event *
{
return event;
}
struct event *
{
return event;
}
struct event *
const struct event_add_field *fields)
{
else
}
return event;
}
{
}
{
}
{
}
const struct event_field *
{
*count_r = 0;
return NULL;
}
}
struct event_category *const *
{
*count_r = 0;
return NULL;
}
}
const char *fmt, ...)
{
}
{
}
}
{
/* if the event is sent again, it needs a new name */
if (event->passthrough)
event_unref(&event);
}
static void
{
switch (field->value_type) {
break;
break;
break;
}
}
{
/* required fields: */
/* optional fields: */
}
if (event->always_log_source) {
}
}
}
}
}
}
}
}
{
}
{
unsigned int usecs;
*error_r = "Invalid timeval seconds parameter";
return FALSE;
}
*error_r = "Timeval missing microseconds parameter";
return FALSE;
}
*error_r = "Invalid timeval microseconds parameter";
return FALSE;
}
return TRUE;
}
const char **error_r)
{
const char *error;
/* required fields: */
*error_r = "Missing required fields";
return FALSE;
}
return FALSE;
}
args += 2;
/* optional fields: */
arg++;
switch (code) {
break;
case EVENT_CODE_CATEGORY: {
return FALSE;
}
break;
}
case EVENT_CODE_TV_LAST_SENT:
return FALSE;
}
args++;
break;
case EVENT_CODE_SENDING_NAME:
break;
case EVENT_CODE_SOURCE:
*error_r = "Source line number missing";
return FALSE;
}
*error_r = "Invalid Source line number";
return FALSE;
}
args++;
break;
case EVENT_CODE_FIELD_INTMAX:
case EVENT_CODE_FIELD_STR:
case EVENT_CODE_FIELD_TIMEVAL: {
*error_r = "Field value is missing";
return FALSE;
}
args++;
switch (code) {
case EVENT_CODE_FIELD_INTMAX:
"Invalid field value '%s' number for '%s'",
return FALSE;
}
break;
case EVENT_CODE_FIELD_STR:
break;
case EVENT_CODE_FIELD_TIMEVAL:
"Field '%s' value '%s': %s",
return FALSE;
}
args++;
break;
default:
i_unreached();
}
break;
}
}
args++;
}
return TRUE;
}
{
}
{
return;
}
}
i_unreached();
}
{
}
{
return;
}
}
i_unreached();
}
{
return;
}
}
i_unreached();
}
{
if (!category->registered) {
/* it was never registered in the first place - ignore */
return;
}
} T_END;
}
static struct event_passthrough *
{
return event_last_passthrough;
}
static struct event_passthrough *
{
return event_last_passthrough;
}
static struct event_passthrough *
{
return event_last_passthrough;
}
static struct event_passthrough *
unsigned int linenum, bool literal_fname)
{
return event_last_passthrough;
}
static struct event_passthrough *
{
return event_last_passthrough;
}
static struct event_passthrough *
{
return event_last_passthrough;
}
static struct event_passthrough *
{
return event_last_passthrough;
}
static struct event_passthrough *
{
return event_last_passthrough;
}
static struct event_passthrough *
{
return event_last_passthrough;
}
static struct event_passthrough *
{
return event_last_passthrough;
}
static struct event_passthrough *
{
return event_last_passthrough;
}
{
return event;
}
};
void lib_event_init(void)
{
}
void lib_event_deinit(void)
{
i_warning("Event %p leaked (parent=%p): %s:%u",
}
}