Source
static void am_db_update_event_tags(zbx_uint64_t eventid, const char *params, zbx_vector_events_tags_t *events_tags)
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
** without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
** See the GNU Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
typedef struct
{
zbx_hashset_t mediatypes;
zbx_ipc_async_socket_t am;
}
zbx_am_db_t;
/******************************************************************************
* *
* Purpose: creates new alert object *
* *
* Parameters: ... - [IN] alert data *
* *
* Return value: alert object. *
* *
******************************************************************************/
static zbx_am_db_alert_t *am_db_create_alert(zbx_uint64_t alertid, zbx_uint64_t mediatypeid, int source,
int object, zbx_uint64_t objectid, zbx_uint64_t eventid, zbx_uint64_t p_eventid, const char *sendto,
const char *subject, const char *message, const char *params, int status, int retries)
{
zbx_am_db_alert_t *alert;
alert = (zbx_am_db_alert_t *)zbx_malloc(NULL, sizeof(zbx_am_db_alert_t));
alert->alertid = alertid;
alert->mediatypeid = mediatypeid;
alert->source = source;
alert->object = object;
alert->objectid = objectid;