diff options
author | Artjoms Rimdjonoks <artjoms.rimdjonoks@zabbix.com> | 2022-01-05 00:50:10 +0300 |
---|---|---|
committer | Artjoms Rimdjonoks <artjoms.rimdjonoks@zabbix.com> | 2022-01-05 00:50:10 +0300 |
commit | 9d822c6f5ead1480d71f3e4d8b31fa2a9391020b (patch) | |
tree | 6ed3e6693afcd38fc32da689f0168d87cf709d4b /src/libs | |
parent | 729a48cff3694ccaa49ef292adb5913894de8c9a (diff) |
.......... [DEV-2051] removed functions names from the function comments
Diffstat (limited to 'src/libs')
134 files changed, 0 insertions, 3990 deletions
diff --git a/src/libs/zbxalgo/algodefs.c b/src/libs/zbxalgo/algodefs.c index bc18707a6e4..1b056f746a1 100644 --- a/src/libs/zbxalgo/algodefs.c +++ b/src/libs/zbxalgo/algodefs.c @@ -387,8 +387,6 @@ int next_prime(int n) /****************************************************************************** * * - * Function: zbx_isqrt32 * - * * * Purpose: calculate integer part of square root of a 32 bit integer value * * * * Parameters: value - [IN] the value to calculate square root for * @@ -422,8 +420,6 @@ unsigned int zbx_isqrt32(unsigned int value) /****************************************************************************** * * - * Function: zbx_gen_uuid4 * - * * * Purpose: calculate UUID version 4 as string of 32 symbols * * * * Parameters: seed - [IN] string for seed calculation * diff --git a/src/libs/zbxalgo/evaluate.c b/src/libs/zbxalgo/evaluate.c index 227b7c5383a..54398d2bc79 100644 --- a/src/libs/zbxalgo/evaluate.c +++ b/src/libs/zbxalgo/evaluate.c @@ -178,8 +178,6 @@ static double evaluate_number(int *unknown_idx) /****************************************************************************** * * - * Function: variant_convert_to_double * - * * * Purpose: cast string variant to a double variant * * * * Parameters: var - [IN/OUT] the variant to cast * @@ -202,8 +200,6 @@ static void variant_convert_to_double(zbx_variant_t *var) /****************************************************************************** * * - * Function: variant_get_double * - * * * Purpose: get variant value in double (float64) format * * * * Parameters: var - [IN] the input variant * @@ -1044,8 +1040,6 @@ int evaluate(double *value, const char *expression, char *error, size_t max_erro /****************************************************************************** * * - * Function: evaluate_unknown * - * * * Purpose: evaluate an expression like "(26.416>10) and not(0=ZBX_UNKNOWN0)" * * * * Parameters: expression - [IN] expression to evaluate * @@ -1096,8 +1090,6 @@ int evaluate_unknown(const char *expression, double *value, char *error, size_t /****************************************************************************** * * - * Function: evaluate_string_to_double * - * * * Purpose: cast string to a double, expand suffixes and parse negative sign * * * * Parameters: in - [IN] the input string * diff --git a/src/libs/zbxalgo/hashset.c b/src/libs/zbxalgo/hashset.c index 3e7ca15a909..489ad33ea05 100644 --- a/src/libs/zbxalgo/hashset.c +++ b/src/libs/zbxalgo/hashset.c @@ -126,8 +126,6 @@ void zbx_hashset_destroy(zbx_hashset_t *hs) /****************************************************************************** * * - * Function: zbx_hashset_reserve * - * * * Purpose: allocation not less than the required number of slots for hashset * * * * Parameters: hs - [IN] the destination hashset * diff --git a/src/libs/zbxalgo/int128.c b/src/libs/zbxalgo/int128.c index ab4036071da..8e1bc237f3c 100644 --- a/src/libs/zbxalgo/int128.c +++ b/src/libs/zbxalgo/int128.c @@ -26,8 +26,6 @@ /****************************************************************************** * * - * Function: udec128_128 * - * * * Purpose: Decrement of 128 bit unsigned integer by the specified value. * * * * Parameters: base - [IN,OUT] the integer to decrement. * @@ -48,8 +46,6 @@ static void udec128_128(zbx_uint128_t *base, const zbx_uint128_t *value) /****************************************************************************** * * - * Function: ushiftr128 * - * * * Purpose: Logical right shift of 128 bit unsigned integer. * * * * Parameters: base - [IN,OUT] the initial value and result * @@ -78,8 +74,6 @@ static void ushiftr128(zbx_uint128_t *base, unsigned int bits) /****************************************************************************** * * - * Function: ushiftl128 * - * * * Purpose: Logical left shift of 128 bit unsigned integer. * * * * Parameters: base - [IN,OUT] the initial value and result * @@ -108,8 +102,6 @@ static void ushiftl128(zbx_uint128_t *base, unsigned int bits) /****************************************************************************** * * - * Function: ucmp128_128 * - * * * Purpose: Comparison of two 128 bit unsigned integer values. * * * * Parameters: value1 - [IN] the first value to compare. * @@ -133,8 +125,6 @@ static int ucmp128_128(const zbx_uint128_t *value1, const zbx_uint128_t *value2) /****************************************************************************** * * - * Function: umul64_32_shift * - * * * Purpose: Multiplication of 64 bit unsigned integer with 32 bit unsigned * * integer value, shifted left by specified number of bits * * * @@ -164,8 +154,6 @@ static void umul64_32_shift(zbx_uint128_t *base, zbx_uint64_t value, zbx_uint64_ /****************************************************************************** * * - * Function: uinc128_64 * - * * * Purpose: Increment of 128 bit unsigned integer by the specified 64 bit * * value. * * * @@ -187,8 +175,6 @@ void uinc128_64(zbx_uint128_t *base, zbx_uint64_t value) /****************************************************************************** * * - * Function: uinc128_128 * - * * * Purpose: Increment of 128 bit unsigned integer by the specified 128 bit * * value * * * @@ -211,8 +197,6 @@ void uinc128_128(zbx_uint128_t *base, const zbx_uint128_t *value) /****************************************************************************** * * - * Function: umul64_64 * - * * * Purpose: Multiplication of two 64 bit unsigned integer values. * * * * Parameters: result - [OUT] the resulting 128 bit unsigned integer value * @@ -233,8 +217,6 @@ void umul64_64(zbx_uint128_t *result, zbx_uint64_t value, zbx_uint64_t factor) /****************************************************************************** * * - * Function: udiv128_64 * - * * * Purpose: Division of 128 bit unsigned integer by a 64 bit unsigned integer * * value. * * * diff --git a/src/libs/zbxalgo/linked_list.c b/src/libs/zbxalgo/linked_list.c index 737173eaf91..b803a332fd0 100644 --- a/src/libs/zbxalgo/linked_list.c +++ b/src/libs/zbxalgo/linked_list.c @@ -22,8 +22,6 @@ /****************************************************************************** * * - * Function: zbx_list_create_ext * - * * * Purpose: create singly linked list (with custom memory functions) * * * * Parameters: queue - [IN] the list * @@ -41,8 +39,6 @@ void zbx_list_create_ext(zbx_list_t *queue, zbx_mem_malloc_func_t mem_malloc_fun /****************************************************************************** * * - * Function: zbx_list_create * - * * * Purpose: create singly linked list * * * * Parameters: queue - [IN] the list * @@ -55,8 +51,6 @@ void zbx_list_create(zbx_list_t *queue) /****************************************************************************** * * - * Function: zbx_list_destroy * - * * * Purpose: destroy list * * * * Parameters: list - [IN] the list * @@ -70,8 +64,6 @@ void zbx_list_destroy(zbx_list_t *list) /****************************************************************************** * * - * Function: list_create_item * - * * * Purpose: allocate memory and initialize a new list item * * * * Parameters: list - [IN] the list * @@ -94,8 +86,6 @@ static void list_create_item(zbx_list_t *list, void *value, zbx_list_item_t **cr /****************************************************************************** * * - * Function: zbx_list_insert_after * - * * * Purpose: insert value after specified position in the list * * * * Parameters: list - [IN] the list * @@ -133,8 +123,6 @@ void zbx_list_insert_after(zbx_list_t *list, zbx_list_item_t *after, void *value /****************************************************************************** * * - * Function: zbx_list_append * - * * * Purpose: append value to the end of the list * * * * Parameters: list - [IN] the list * @@ -149,8 +137,6 @@ void zbx_list_append(zbx_list_t *list, void *value, zbx_list_item_t **inserted) /****************************************************************************** * * - * Function: zbx_list_prepend * - * * * Purpose: prepend value to the beginning of the list * * * * Parameters: list - [IN] the list * @@ -175,8 +161,6 @@ void zbx_list_prepend(zbx_list_t *list, void *value, zbx_list_item_t **inserted) /****************************************************************************** * * - * Function: zbx_list_pop * - * * * Purpose: removes a value from the beginning of the list * * * * Parameters: list - [IN] the list * @@ -209,8 +193,6 @@ int zbx_list_pop(zbx_list_t *list, void **value) /****************************************************************************** * * - * Function: zbx_list_peek * - * * * Purpose: get value from the queue without dequeuing * * * * Parameters: list - [IN] the list * @@ -233,8 +215,6 @@ int zbx_list_peek(const zbx_list_t *list, void **value) /****************************************************************************** * * - * Function: zbx_list_iterator_init * - * * * Purpose: initialize list iterator * * * * Parameters: list - [IN] the list * @@ -250,8 +230,6 @@ void zbx_list_iterator_init(zbx_list_t *list, zbx_list_iterator_t *iterator) /****************************************************************************** * * - * Function: zbx_list_iterator_next * - * * * Purpose: advance list iterator * * * * Parameters: iterator - [IN] the iterator to be advanced * @@ -275,8 +253,6 @@ int zbx_list_iterator_next(zbx_list_iterator_t *iterator) /****************************************************************************** * * - * Function: zbx_list_iterator_peek * - * * * Purpose: get value without removing it from list * * * * Parameters: iterator - [IN] initialized list iterator * @@ -299,8 +275,6 @@ int zbx_list_iterator_peek(const zbx_list_iterator_t *iterator, void **value) /****************************************************************************** * * - * Function: zbx_list_iterator_clear * - * * * Purpose: clears iterator leaving it in uninitialized state * * * * Parameters: iterator - [IN] list iterator * @@ -313,8 +287,6 @@ void zbx_list_iterator_clear(zbx_list_iterator_t *iterator) /****************************************************************************** * * - * Function: zbx_list_iterator_equal * - * * * Purpose: tests if two iterators points at the same list item * * * * Parameters: iterator1 - [IN] first list iterator * @@ -334,8 +306,6 @@ int zbx_list_iterator_equal(const zbx_list_iterator_t *iterator1, const zbx_list /****************************************************************************** * * - * Function: zbx_list_iterator_isset * - * * * Purpose: checks if the iterator points at some list item * * * * Parameters: iterator - [IN] list iterator * @@ -350,8 +320,6 @@ int zbx_list_iterator_isset(const zbx_list_iterator_t *iterator) /****************************************************************************** * * - * Function: zbx_list_iterator_update * - * * * Purpose: updates iterator * * * * Parameters: iterator - [IN] list iterator * diff --git a/src/libs/zbxalgo/queue.c b/src/libs/zbxalgo/queue.c index 10430f96472..11d5fab0e26 100644 --- a/src/libs/zbxalgo/queue.c +++ b/src/libs/zbxalgo/queue.c @@ -22,8 +22,6 @@ /****************************************************************************** * * - * Function: zbx_queue_ptr_values_num * - * * * Purpose: calculates the number of values in queue * * * * Parameters: queue - [IN] the queue * @@ -44,8 +42,6 @@ int zbx_queue_ptr_values_num(zbx_queue_ptr_t *queue) /****************************************************************************** * * - * Function: zbx_queue_ptr_reserve * - * * * Purpose: reserves space in queue for additional values * * * * Parameters: queue - [IN] the queue * @@ -77,8 +73,6 @@ void zbx_queue_ptr_reserve(zbx_queue_ptr_t *queue, int num) /****************************************************************************** * * - * Function: zbx_queue_ptr_compact * - * * * Purpose: compacts queue by freeing unused space * * * * Parameters: queue - [IN] the queue * @@ -116,8 +110,6 @@ void zbx_queue_ptr_compact(zbx_queue_ptr_t *queue) /****************************************************************************** * * - * Function: zbx_queue_ptr_create * - * * * Purpose: creates queue * * * * Parameters: queue - [IN] the queue * @@ -130,8 +122,6 @@ void zbx_queue_ptr_create(zbx_queue_ptr_t *queue) /****************************************************************************** * * - * Function: zbx_queue_ptr_destroy * - * * * Purpose: destroys queue * * * * Parameters: queue - [IN] the queue * @@ -144,8 +134,6 @@ void zbx_queue_ptr_destroy(zbx_queue_ptr_t *queue) /****************************************************************************** * * - * Function: zbx_queue_ptr_push * - * * * Purpose: pushes value in the queue * * * * Parameters: queue - [IN] the queue * @@ -163,8 +151,6 @@ void zbx_queue_ptr_push(zbx_queue_ptr_t *queue, void *value) /****************************************************************************** * * - * Function: zbx_queue_ptr_pop * - * * * Purpose: pops value in the queue * * * * Parameters: queue - [IN] the queue * @@ -194,8 +180,6 @@ void *zbx_queue_ptr_pop(zbx_queue_ptr_t *queue) /****************************************************************************** * * - * Function: zbx_queue_ptr_remove_value * - * * * Purpose: removes specified value from queue * * * * Parameters: queue - [IN] the queue * diff --git a/src/libs/zbxalgo/serialize.c b/src/libs/zbxalgo/serialize.c index 9cb0dc09a0c..feac0c2e383 100644 --- a/src/libs/zbxalgo/serialize.c +++ b/src/libs/zbxalgo/serialize.c @@ -21,8 +21,6 @@ #include "zbxserialize.h" /****************************************************************************** * * - * Function: zbx_serialize_uint31_compact * - * * * Purpose: serialize 31 bit unsigned integer into utf-8 like byte stream * * * * Parameters: ptr - [OUT] the output buffer * @@ -63,8 +61,6 @@ zbx_uint32_t zbx_serialize_uint31_compact(unsigned char *ptr, zbx_uint32_t value /****************************************************************************** * * - * Function: zbx_deserialize_uint31_compact * - * * * Purpose: deserialize 31 bit unsigned integer from utf-8 like byte stream * * * * Parameters: ptr - [IN] the byte stream * diff --git a/src/libs/zbxaudit/audit.c b/src/libs/zbxaudit/audit.c index 77da07f08f9..4a4552eda1d 100644 --- a/src/libs/zbxaudit/audit.c +++ b/src/libs/zbxaudit/audit.c @@ -160,8 +160,6 @@ static void delete_json(struct zbx_json *json, const char *audit_op, const char /****************************************************************************** * * - * Function: zbx_auditlog_global_script * - * * * Purpose: record global script execution results into audit log * * * * Comments: 'hostid' should be always > 0. 'eventid' is > 0 in case of * diff --git a/src/libs/zbxaudit/audit_item.c b/src/libs/zbxaudit/audit_item.c index 1eadbc106cc..af4b34107e0 100644 --- a/src/libs/zbxaudit/audit_item.c +++ b/src/libs/zbxaudit/audit_item.c @@ -366,8 +366,6 @@ PREPARE_AUDIT_ITEM_UPDATE(key, const char*, string) /****************************************************************************** * * - * Function: zbx_audit_item_create_entry_for_delete * - * * * Parameters: id - [IN] resource id * * name - [IN] resource name * * flag - [IN] resource flag * @@ -402,8 +400,6 @@ void zbx_audit_item_create_entry_for_delete(zbx_uint64_t id, const char *name, i /****************************************************************************** * * - * Function: zbx_audit_DBselect_delete_for_item * - * * * Parameters: sql - [IN] sql statement * * ids - [OUT] sorted list of selected uint64 values * * * diff --git a/src/libs/zbxaudit/audit_trigger.c b/src/libs/zbxaudit/audit_trigger.c index 7a6e6199ce8..88ad93f98f9 100644 --- a/src/libs/zbxaudit/audit_trigger.c +++ b/src/libs/zbxaudit/audit_trigger.c @@ -216,8 +216,6 @@ PREPARE_AUDIT_TRIGGER_UPDATE(recovery_expression, const char*, string) /****************************************************************************** * * - * Function: zbx_audit_DBselect_delete_for_trigger * - * * * Parameters: sql - [IN] sql statement * * ids - [OUT] sorted list of selected uint64 values * * * diff --git a/src/libs/zbxcommon/comms.c b/src/libs/zbxcommon/comms.c index 6fa9fafaa07..48a0ecdfc42 100644 --- a/src/libs/zbxcommon/comms.c +++ b/src/libs/zbxcommon/comms.c @@ -113,8 +113,6 @@ int comms_parse_response(char *xml, char *host, size_t host_len, char *key, size /****************************************************************************** * * - * Function: zbx_htole_uint64 * - * * * Purpose: convert unsigned integer 64 bit * * from host byte order * * to little-endian byte order format * @@ -148,8 +146,6 @@ zbx_uint64_t zbx_htole_uint64(zbx_uint64_t data) /****************************************************************************** * * - * Function: zbx_letoh_uint64 * - * * * Purpose: convert unsigned integer 64 bit * * from little-endian byte order format * * to host byte order * @@ -183,8 +179,6 @@ zbx_uint64_t zbx_letoh_uint64(zbx_uint64_t data) /****************************************************************************** * * - * Function: zbx_htole_uint32 * - * * * Purpose: convert unsigned integer 32 bit * * from host byte order * * to little-endian byte order format * @@ -210,8 +204,6 @@ zbx_uint32_t zbx_htole_uint32(zbx_uint32_t data) /****************************************************************************** * * - * Function: zbx_letoh_uint32 * - * * * Purpose: convert unsigned integer 32 bit * * from little-endian byte order format * * to host byte order * diff --git a/src/libs/zbxcommon/cuid.c b/src/libs/zbxcommon/cuid.c index a0ee567a1a1..1b09436492a 100644 --- a/src/libs/zbxcommon/cuid.c +++ b/src/libs/zbxcommon/cuid.c @@ -44,8 +44,6 @@ static char host_block[HOST_TMP_36_BASE_BUF_LEN]; /****************************************************************************** * * - * Function: pad * - * * * Purpose: modify string in-place to the specified length as required by * * CUID algorithm * * * @@ -128,8 +126,6 @@ static void from_decimal(char *res, size_t base, size_t input_num) /****************************************************************************** * * - * Function: zbx_cuid_init * - * * * Purpose: initializes context for the cuid generation * * * ******************************************************************************/ @@ -176,8 +172,6 @@ static size_t next(void) /****************************************************************************** * * - * Function: zbx_new_cuid * - * * * Purpose: generates cuid, is based on the go cuid implementation from * * https://github.com/lucsky/cuid/blob/master/cuid.go * * consider using mutexes around it if used inside threads * diff --git a/src/libs/zbxcommon/file.c b/src/libs/zbxcommon/file.c index dff829b1ab6..e5152d4e21e 100644 --- a/src/libs/zbxcommon/file.c +++ b/src/libs/zbxcommon/file.c @@ -80,8 +80,6 @@ void find_cr_lf_szbyte(const char *encoding, const char **cr, const char **lf, s /****************************************************************************** * * - * Function: zbx_read * - * * * Purpose: Read one text line from a file descriptor into buffer * * * * Parameters: fd - [IN] file descriptor to read from * @@ -189,8 +187,6 @@ char *zbx_fgets(char *buffer, int size, FILE *fp) /****************************************************************************** * * - * Function: zbx_write_all * - * * * Purpose: call write in a loop, iterating until all the data is written. * * * * Parameters: fd - [IN] descriptor * diff --git a/src/libs/zbxcommon/iprange.c b/src/libs/zbxcommon/iprange.c index 4cc14418be6..6a9643d7709 100644 --- a/src/libs/zbxcommon/iprange.c +++ b/src/libs/zbxcommon/iprange.c @@ -21,8 +21,6 @@ /****************************************************************************** * * - * Function: iprange_is_whitespace_character * - * * * Purpose: checks if the specified character is allowed whitespace character * * that can be used before or after iprange definition * * * @@ -48,8 +46,6 @@ static int iprange_is_whitespace_character(unsigned char value) /****************************************************************************** * * - * Function: iprange_address_length * - * * * Purpose: calculates the length of address data without trailing whitespace * * * ******************************************************************************/ @@ -72,8 +68,6 @@ static size_t iprange_address_length(const char *address) /****************************************************************************** * * - * Function: iprange_apply_mask * - * * * Purpose: applies a bit mask to the parsed v4 or v6 IP range * * * * Parameters: iprange - [IN] the IP range * @@ -119,8 +113,6 @@ static void iprange_apply_mask(zbx_iprange_t *iprange, int bits) /****************************************************************************** * * - * Function: iprangev4_parse * - * * * Purpose: parse IPv4 address into IP range structure * * * * Parameters: iprange - [OUT] the IP range * @@ -213,8 +205,6 @@ static int iprangev4_parse(zbx_iprange_t *iprange, const char *address) /****************************************************************************** * * - * Function: iprangev6_parse * - * * * Purpose: parse IPv6 address into IP range structure * * * * Parameters: iprange - [OUT] the IP range * @@ -349,8 +339,6 @@ check_fill: /****************************************************************************** * * - * Function: iprange_parse * - * * * Purpose: parse IP address (v4 or v6) into IP range structure * * * * Parameters: iprange - [OUT] the IP range * @@ -376,8 +364,6 @@ int iprange_parse(zbx_iprange_t *iprange, const char *address) /****************************************************************************** * * - * Function: iprange_first * - * * * Purpose: gets the first IP address from the specified range * * * * Parameters: iprange - [IN] the IP range * @@ -403,8 +389,6 @@ void iprange_first(const zbx_iprange_t *iprange, int *address) /****************************************************************************** * * - * Function: iprange_next * - * * * Purpose: gets the next IP address from the specified range * * * * Parameters: iprange - [IN] the IP range * @@ -454,8 +438,6 @@ int iprange_next(const zbx_iprange_t *iprange, int *address) /****************************************************************************** * * - * Function: iprange_validate * - * * * Purpose: checks if the IP address is in specified range * * * * Parameters: iprange - [IN] the IP range * @@ -483,8 +465,6 @@ int iprange_validate(const zbx_iprange_t *iprange, const int *address) /****************************************************************************** * * - * Function: iprange_volume * - * * * Purpose: get the number of addresses covered by the specified IP range * * * * Parameters: iprange - [IN] the IP range * diff --git a/src/libs/zbxcommon/misc.c b/src/libs/zbxcommon/misc.c index 3a5c5cf3409..59638681871 100644 --- a/src/libs/zbxcommon/misc.c +++ b/src/libs/zbxcommon/misc.c @@ -126,8 +126,6 @@ out: /****************************************************************************** * * - * Function: get_program_name * - * * * Purpose: return program name without path * * * * Parameters: path * @@ -152,8 +150,6 @@ const char *get_program_name(const char *path) /****************************************************************************** * * - * Function: zbx_timespec * - * * * Purpose: Gets the current time. * * * * Author: Alexander Vladishev * @@ -275,8 +271,6 @@ void zbx_timespec(zbx_timespec_t *ts) /****************************************************************************** * * - * Function: zbx_time * - * * * Purpose: Gets the current time. * * * * Return value: Time in seconds * @@ -298,8 +292,6 @@ double zbx_time(void) /****************************************************************************** * * - * Function: zbx_current_time * - * * * Purpose: Gets the current time including UTC offset * * * * Return value: Time in seconds * @@ -314,8 +306,6 @@ double zbx_current_time(void) /****************************************************************************** * * - * Function: zbx_is_leap_year * - * * * Return value: SUCCEED - year is a leap year * * FAIL - year is not a leap year * * * @@ -327,8 +317,6 @@ int zbx_is_leap_year(int year) /****************************************************************************** * * - * Function: zbx_get_time * - * * * Purpose: * * get current time and store it in memory locations provided by caller * * * @@ -378,8 +366,6 @@ void zbx_get_time(struct tm *tm, long *milliseconds, zbx_timezone_t *tz) /****************************************************************************** * * - * Function: zbx_get_timezone_offset * - * * * Purpose: get time offset from UTC * * * * Parameters: t - [IN] input time to calculate offset with * @@ -421,8 +407,6 @@ long zbx_get_timezone_offset(time_t t, struct tm *tm) /****************************************************************************** * * - * Function: zbx_localtime * - * * * Purpose: get broken-down representation of the time in specified time zone * * * * Parameters: time - [IN] input time * @@ -468,8 +452,6 @@ struct tm *zbx_localtime(const time_t *time, const char *tz) /****************************************************************************** * * - * Function: zbx_utc_time * - * * * Purpose: get UTC time from time from broken down time elements * * * * Parameters: * @@ -509,8 +491,6 @@ int zbx_utc_time(int year, int mon, int mday, int hour, int min, int sec, int *t /****************************************************************************** * * - * Function: zbx_day_in_month * - * * * Purpose: returns number of days in a month * * * * Parameters: * @@ -536,8 +516,6 @@ int zbx_day_in_month(int year, int mon) /****************************************************************************** * * - * Function: zbx_get_duration_ms * - * * * Purpose: get duration in milliseconds since time stamp till current time * * * * Parameters: * @@ -557,8 +535,6 @@ zbx_uint64_t zbx_get_duration_ms(const zbx_timespec_t *ts) /****************************************************************************** * * - * Function: zbx_calloc2 * - * * * Purpose: allocates nmemb * size bytes of memory and fills it with zeros * * * * Return value: returns a pointer to the newly allocated memory * @@ -596,8 +572,6 @@ void *zbx_calloc2(const char *filename, int line, void *old, size_t nmemb, size_ /****************************************************************************** * * - * Function: zbx_malloc2 * - * * * Purpose: allocates size bytes of memory * * * * Return value: returns a pointer to the newly allocated memory * @@ -635,8 +609,6 @@ void *zbx_malloc2(const char *filename, int line, void *old, size_t size) /****************************************************************************** * * - * Function: zbx_realloc2 * - * * * Purpose: changes the size of the memory block pointed to by old * * to size bytes * * * @@ -686,8 +658,6 @@ char *zbx_strdup2(const char *filename, int line, char *old, const char *str) /**************************************************************************************** * * - * Function: zbx_guaranteed_memset * - * * * Purpose: For overwriting sensitive data in memory. * * Similar to memset() but should not be optimized out by a compiler. * * * @@ -709,8 +679,6 @@ void *zbx_guaranteed_memset(void *v, int c, size_t n) /****************************************************************************** * * - * Function: __zbx_zbx_setproctitle * - * * * Purpose: set process title * * * * Author: Eugene Grigorjev * @@ -738,8 +706,6 @@ void zbx_setproctitle(const char *fmt, ...) /****************************************************************************** * * - * Function: check_time_period * - * * * Purpose: check if current time is within given period * * * * Parameters: period - [IN] preprocessed time period * @@ -763,8 +729,6 @@ static int check_time_period(const zbx_time_period_t period, struct tm *tm) /****************************************************************************** * * - * Function: get_current_delay * - * * * Purpose: return delay value that is currently applicable * * * * Parameters: default_delay - [IN] default delay value, can be overridden * @@ -797,8 +761,6 @@ static int get_current_delay(int default_delay, const zbx_flexible_interval_t *f /****************************************************************************** * * - * Function: get_next_delay_interval * - * * * Purpose: return time when next delay settings take effect * * * * Parameters: flex_intervals - [IN] preprocessed flexible intervals * @@ -857,8 +819,6 @@ static int get_next_delay_interval(const zbx_flexible_interval_t *flex_intervals /****************************************************************************** * * - * Function: time_parse * - * * * Purpose: parses time of day * * * * Parameters: time - [OUT] number of seconds since the beginning of * @@ -909,8 +869,6 @@ static int time_parse(int *time, const char *text, int len, int *parsed_len) /****************************************************************************** * * - * Function: time_period_parse * - * * * Purpose: parses time period * * * * Parameters: period - [OUT] time period structure * @@ -978,8 +936,6 @@ static int time_period_parse(zbx_time_period_t *period, const char *text, int le /****************************************************************************** * * - * Function: zbx_check_time_period * - * * * Purpose: validate time period and check if specified time is within it * * * * Parameters: period - [IN] semicolon-separated list of time periods in one * @@ -1026,8 +982,6 @@ int zbx_check_time_period(const char *period, time_t time, const char *tz, int * /****************************************************************************** * * - * Function: flexible_interval_free * - * * * Purpose: frees flexible interval * * * * Parameters: interval - [IN] flexible interval * @@ -1046,8 +1000,6 @@ static void flexible_interval_free(zbx_flexible_interval_t *interval) /****************************************************************************** * * - * Function: flexible_interval_parse * - * * * Purpose: parses flexible interval * * * * Parameters: interval - [IN/OUT] the first interval * @@ -1079,8 +1031,6 @@ static int flexible_interval_parse(zbx_flexible_interval_t *interval, const char /****************************************************************************** * * - * Function: calculate_dayofweek * - * * * Purpose: calculates day of week * * * * Parameters: year - [IN] the year (>1752) * @@ -1102,8 +1052,6 @@ static int calculate_dayofweek(int year, int mon, int mday) /****************************************************************************** * * - * Function: scheduler_filter_free * - * * * Purpose: frees scheduler interval filter * * * * Parameters: filter - [IN] scheduler interval filter * @@ -1122,8 +1070,6 @@ static void scheduler_filter_free(zbx_scheduler_filter_t *filter) /****************************************************************************** * * - * Function: scheduler_interval_free * - * * * Purpose: frees scheduler interval * * * * Parameters: interval - [IN] scheduler interval * @@ -1149,8 +1095,6 @@ static void scheduler_interval_free(zbx_scheduler_interval_t *interval) /****************************************************************************** * * - * Function: scheduler_parse_filter_r * - * * * Purpose: parses text string into scheduler filter * * * * Parameters: filter - [IN/OUT] the first filter * @@ -1273,8 +1217,6 @@ static int scheduler_parse_filter_r(zbx_scheduler_filter_t **filter, const char /****************************************************************************** * * - * Function: scheduler_parse_filter * - * * * Purpose: parses text string into scheduler filter * * * * Parameters: filter - [IN/OUT] the first filter * @@ -1305,8 +1247,6 @@ static int scheduler_parse_filter(zbx_scheduler_filter_t **filter, const char *t /****************************************************************************** * * - * Function: scheduler_interval_parse * - * * * Purpose: parses scheduler interval * * * * Parameters: interval - [IN/OUT] the first interval * @@ -1395,8 +1335,6 @@ static int scheduler_interval_parse(zbx_scheduler_interval_t *interval, const ch /****************************************************************************** * * - * Function: scheduler_get_nearest_filter_value * - * * * Purpose: gets the next nearest value that satisfies the filter chain * * * * Parameters: filter - [IN] the filter chain * @@ -1448,8 +1386,6 @@ static int scheduler_get_nearest_filter_value(const zbx_scheduler_filter_t *filt /****************************************************************************** * * - * Function: scheduler_get_wday_nextcheck * - * * * Purpose: calculates the next day that satisfies the week day filter * * * * Parameters: interval - [IN] the scheduler interval * @@ -1493,8 +1429,6 @@ static int scheduler_get_wday_nextcheck(const zbx_scheduler_interval_t *interval /****************************************************************************** * * - * Function: scheduler_validate_wday_filter * - * * * Purpose: checks if the specified date satisfies week day filter * * * * Parameters: interval - [IN] the scheduler interval * @@ -1537,8 +1471,6 @@ static int scheduler_validate_wday_filter(const zbx_scheduler_interval_t *interv /****************************************************************************** * * - * Function: scheduler_get_day_nextcheck * - * * * Purpose: calculates the next day that satisfies month and week day filters * * * * Parameters: interval - [IN] the scheduler interval * @@ -1585,8 +1517,6 @@ static int scheduler_get_day_nextcheck(const zbx_scheduler_interval_t *interval, /****************************************************************************** * * - * Function: scheduler_get_filter_nextcheck * - * * * Purpose: calculates the time/day that satisfies the specified filter * * * * Parameters: interval - [IN] the scheduler interval * @@ -1652,8 +1582,6 @@ static int scheduler_get_filter_nextcheck(const zbx_scheduler_interval_t *interv /****************************************************************************** * * - * Function: scheduler_apply_day_filter * - * * * Purpose: applies day filter to the specified time/day calculating the next * * scheduled check * * * @@ -1687,8 +1615,6 @@ static void scheduler_apply_day_filter(zbx_scheduler_interval_t *interval, struc /****************************************************************************** * * - * Function: scheduler_apply_hour_filter * - * * * Purpose: applies hour filter to the specified time/day calculating the * * next scheduled check * * * @@ -1719,8 +1645,6 @@ static void scheduler_apply_hour_filter(zbx_scheduler_interval_t *interval, stru /****************************************************************************** * * - * Function: scheduler_apply_minute_filter * - * * * Purpose: applies minute filter to the specified time/day calculating the * * next scheduled check * * * @@ -1748,8 +1672,6 @@ static void scheduler_apply_minute_filter(zbx_scheduler_interval_t *interval, st /****************************************************************************** * * - * Function: scheduler_apply_second_filter * - * * * Purpose: applies second filter to the specified time/day calculating the * * next scheduled check * * * @@ -1771,8 +1693,6 @@ static void scheduler_apply_second_filter(zbx_scheduler_interval_t *interval, st /****************************************************************************** * * - * Function: scheduler_find_dst_change * - * * * Purpose: finds daylight saving change time inside specified time period * * * * Parameters: time_start - [IN] the time period start * @@ -1821,8 +1741,6 @@ static time_t scheduler_find_dst_change(time_t time_start, time_t time_end) /****************************************************************************** * * - * Function: scheduler_tm_inc * - * * * Purpose: increment struct tm value by one second * * * * Parameters: tm - [IN/OUT] the tm structure to increment * @@ -1856,8 +1774,6 @@ static void scheduler_tm_inc(struct tm *tm) /****************************************************************************** * * - * Function: scheduler_get_nextcheck * - * * * Purpose: finds the next timestamp satisfying one of intervals. * * * * Parameters: interval - [IN] the scheduler interval * @@ -1916,8 +1832,6 @@ static time_t scheduler_get_nextcheck(zbx_scheduler_interval_t *interval, time_t /****************************************************************************** * * - * Function: parse_user_macro * - * * * Purpose: parses user macro and finds it's length * * * * Parameters: str - [IN] string to check * @@ -1946,8 +1860,6 @@ static int parse_user_macro(const char *str, int *len) /****************************************************************************** * * - * Function: parse_simple_interval * - * * * Purpose: parses user macro and finds it's length * * * * Parameters: str - [IN] string to check * @@ -1978,8 +1890,6 @@ static int parse_simple_interval(const char *str, int *len, char sep, int *value /****************************************************************************** * * - * Function: zbx_validate_interval * - * * * Purpose: validate update interval, flexible and scheduling intervals * * * * Parameters: str - [IN] string to check * @@ -2099,8 +2009,6 @@ int zbx_validate_interval(const char *str, char **error) /****************************************************************************** * * - * Function: zbx_interval_preproc * - * * * Purpose: parses item and low-level discovery rule update intervals * * * * Parameters: interval_str - [IN] update interval string to parse * @@ -2203,8 +2111,6 @@ fail: /****************************************************************************** * * - * Function: zbx_custom_interval_free * - * * * Purpose: frees custom update intervals * * * * Parameters: custom_intervals - [IN] custom intervals * @@ -2219,8 +2125,6 @@ void zbx_custom_interval_free(zbx_custom_interval_t *custom_intervals) /****************************************************************************** * * - * Function: calculate_item_nextcheck * - * * * Purpose: calculate nextcheck timestamp for item * * * * Parameters: seed - [IN] the seed value applied to delay to * @@ -2322,8 +2226,6 @@ int calculate_item_nextcheck(zbx_uint64_t seed, int item_type, int simple_interv } /****************************************************************************** * * - * Function: calculate_item_nextcheck_unreachable * - * * * Purpose: calculate nextcheck timestamp for item on unreachable host * * * * Parameters: simple_interval - [IN] default delay value, can be overridden * @@ -2374,8 +2276,6 @@ int calculate_item_nextcheck_unreachable(int simple_interval, const zbx_custom_i } /****************************************************************************** * * - * Function: calculate_proxy_nextcheck * - * * * Purpose: calculate nextcheck timestamp for passive proxy * * * * Parameters: hostid - [IN] host identifier from database * @@ -2401,8 +2301,6 @@ time_t calculate_proxy_nextcheck(zbx_uint64_t hostid, unsigned int delay, time_t /****************************************************************************** * * - * Function: is_ip4 * - * * * Purpose: is string IPv4 address * * * * Parameters: ip - string * @@ -2454,8 +2352,6 @@ int is_ip4(const char *ip) /****************************************************************************** * * - * Function: is_ip6 * - * * * Purpose: is string IPv6 address * * * * Parameters: ip - string * @@ -2520,8 +2416,6 @@ int is_ip6(const char *ip) /****************************************************************************** * * - * Function: is_supported_ip * - * * * Purpose: is string IP address of supported version * * * * Parameters: ip - string * @@ -2545,8 +2439,6 @@ int is_supported_ip(const char *ip) /****************************************************************************** * * - * Function: is_ip * - * * * Purpose: is string IP address * * * * Parameters: ip - string * @@ -2564,8 +2456,6 @@ int is_ip(const char *ip) /****************************************************************************** * * - * Function: zbx_validate_hostname * - * * * Purpose: check if string is a valid internet hostname * * * * Parameters: hostname - [IN] hostname string to be checked * @@ -2609,8 +2499,6 @@ int zbx_validate_hostname(const char *hostname) /****************************************************************************** * * - * Function: ip_in_list * - * * * Purpose: check if ip matches range of ip addresses * * * * Parameters: list - [IN] comma-separated list of ip ranges * @@ -2669,8 +2557,6 @@ out: /****************************************************************************** * * - * Function: int_in_list * - * * * Purpose: check if integer matches a list of integers * * * * Parameters: list - integers [i1-i2,i3,i4,i5-i6] (10-25,45,67-699) * @@ -2737,8 +2623,6 @@ int zbx_double_compare(double a, double b) /****************************************************************************** * * - * Function: is_double_suffix * - * * * Purpose: check if the string is double * * * * Parameters: str - string to check * @@ -2788,8 +2672,6 @@ static int is_double_valid_syntax(const char *str) /****************************************************************************** * * - * Function: is_double * - * * * Purpose: validate and optionally convert a string to a number of type * * 'double' * * * @@ -2830,8 +2712,6 @@ int is_double(const char *str, double *value) /****************************************************************************** * * - * Function: is_time_suffix * - * * * Purpose: check if the string is a non-negative integer with or without * * supported time suffix * * * @@ -2932,8 +2812,6 @@ int _wis_uint(const wchar_t *wide_string) /****************************************************************************** * * - * Function: is_uint_n_range * - * * * Purpose: check if the string is unsigned integer within the specified * * range and optionally store it into value parameter * * * @@ -2994,8 +2872,6 @@ int is_uint_n_range(const char *str, size_t n, void *value, size_t size, zbx_uin /****************************************************************************** * * - * Function: is_hex_n_range * - * * * Purpose: check if the string is unsigned hexadecimal integer within the * * specified range and optionally store it into value parameter * * * @@ -3058,8 +2934,6 @@ int is_hex_n_range(const char *str, size_t n, void *value, size_t size, zbx_uint /****************************************************************************** * * - * Function: is_boolean * - * * * Purpose: check if the string is boolean * * * * Parameters: str - string to check * @@ -3100,8 +2974,6 @@ int is_boolean(const char *str, zbx_uint64_t *value) /****************************************************************************** * * - * Function: is_uoct * - * * * Purpose: check if the string is unsigned octal * * * * Parameters: str - string to check * @@ -3138,8 +3010,6 @@ int is_uoct(const char *str) /****************************************************************************** * * - * Function: is_uhex * - * * * Purpose: check if the string is unsigned hexadecimal representation of * * data in the form "0-9, a-f or A-F" * * * @@ -3177,8 +3047,6 @@ int is_uhex(const char *str) /****************************************************************************** * * - * Function: is_hex_string * - * * * Purpose: check if the string is a hexadecimal representation of data in * * the form "F4 CE 46 01 0C 44 8B F4\nA0 2C 29 74 5D 3F 13 49\n" * * * @@ -3217,8 +3085,6 @@ int is_hex_string(const char *str) /****************************************************************************** * * - * Function: get_nearestindex * - * * * Purpose: get nearest index position of sorted elements in array * * * * Parameters: p - pointer to array of elements * @@ -3264,8 +3130,6 @@ int get_nearestindex(const void *p, size_t sz, int num, zbx_uint64_t id) /****************************************************************************** * * - * Function: uint64_array_add * - * * * Purpose: add uint64 value to dynamic array * * * * Author: Alexander Vladishev * @@ -3301,8 +3165,6 @@ int uint64_array_add(zbx_uint64_t **values, int *alloc, int *num, zbx_uint64_t v /****************************************************************************** * * - * Function: uint64_array_exists * - * * * Author: Alexander Vladishev * * * ******************************************************************************/ @@ -3319,8 +3181,6 @@ int uint64_array_exists(const zbx_uint64_t *values, int num, zbx_uint64_t value) /****************************************************************************** * * - * Function: uint64_array_remove * - * * * Purpose: remove uint64 values from array * * * * Author: Alexander Vladishev * @@ -3370,8 +3230,6 @@ zbx_uint64_t suffix2factor(char c) /****************************************************************************** * * - * Function: str2uint64 * - * * * Purpose: convert string to 64bit unsigned integer * * * * Parameters: str - string to convert * @@ -3410,8 +3268,6 @@ int str2uint64(const char *str, const char *suffixes, zbx_uint64_t *value) /****************************************************************************** * * - * Function: str2double * - * * * Purpose: convert string to double * * * * Parameters: str - string to convert * @@ -3435,8 +3291,6 @@ double str2double(const char *str) /****************************************************************************** * * - * Function: is_hostname_char * - * * * Return value: SUCCEED - the char is allowed in the host name * * FAIL - otherwise * * * @@ -3459,8 +3313,6 @@ int is_hostname_char(unsigned char c) /****************************************************************************** * * - * Function: is_key_char * - * * * Return value: SUCCEED - the char is allowed in the item key * * FAIL - otherwise * * * @@ -3483,8 +3335,6 @@ int is_key_char(unsigned char c) /****************************************************************************** * * - * Function: is_function_char * - * * * Return value: SUCCEED - the char is allowed in the trigger function * * FAIL - otherwise * * * @@ -3504,8 +3354,6 @@ int is_function_char(unsigned char c) /****************************************************************************** * * - * Function: is_macro_char * - * * * Return value: SUCCEED - the char is allowed in the macro name * * FAIL - otherwise * * * @@ -3531,8 +3379,6 @@ int is_macro_char(unsigned char c) /****************************************************************************** * * - * Function: is_discovery_macro * - * * * Purpose: checks if the name is a valid discovery macro * * * * Return value: SUCCEED - the name is a valid discovery macro * @@ -3559,8 +3405,6 @@ int is_discovery_macro(const char *name) /****************************************************************************** * * - * Function: zbx_get_function_type * - * * * Purpose: Returns function type based on its name * * * * Return value: Function type. * @@ -3582,8 +3426,6 @@ zbx_function_type_t zbx_get_function_type(const char *func) /****************************************************************************** * * - * Function: make_hostname * - * * * Purpose: replace all not-allowed hostname characters in the string * * * * Parameters: host - the target C-style string * @@ -3608,8 +3450,6 @@ void make_hostname(char *host) /****************************************************************************** * * - * Function: get_interface_type_by_item_type * - * * * Purpose: * * * * Parameters: * @@ -3648,8 +3488,6 @@ unsigned char get_interface_type_by_item_type(unsigned char type) /****************************************************************************** * * - * Function: calculate_sleeptime * - * * * Purpose: calculate sleep time for Zabbix processes * * * * Parameters: nextcheck - [IN] next check or -1 (FAIL) if nothing to do * @@ -3680,8 +3518,6 @@ int calculate_sleeptime(int nextcheck, int max_sleeptime) /****************************************************************************** * * - * Function: parse_serveractive_element * - * * * Purpose: parse a ServerActive element like "IP<:port>" or "[IPv6]<:port>" * * * ******************************************************************************/ @@ -3783,8 +3619,6 @@ int zbx_alarm_timed_out(void) /****************************************************************************** * * - * Function: zbx_create_token * - * * * Purpose: creates semi-unique token based on the seed and current timestamp * * * * Parameters: seed - [IN] the seed * @@ -3827,8 +3661,6 @@ char *zbx_create_token(zbx_uint64_t seed) #if !defined(_WINDOWS) && defined(HAVE_RESOLV_H) /****************************************************************************** * * - * Function: update_resolver_conf * - * * * Purpose: react to "/etc/resolv.conf" update * * * * Comments: it is intended to call this function in the end of each process * @@ -3858,8 +3690,6 @@ static void update_resolver_conf(void) /****************************************************************************** * * - * Function: zbx_update_env * - * * * Purpose: throttling of update "/etc/resolv.conf" and "stdio" to the new * * log file after rotation * * * @@ -3883,8 +3713,6 @@ void zbx_update_env(double time_now) /****************************************************************************** * * - * Function: zbx_dc_get_agent_item_nextcheck * - * * * Purpose: calculate item nextcheck for Zabbix agent type items * * * ******************************************************************************/ @@ -3908,8 +3736,6 @@ int zbx_get_agent_item_nextcheck(zbx_uint64_t itemid, const char *delay, int now /****************************************************************************** * * - * Function: zbx_get_report_nextcheck * - * * * Purpose: calculate report nextcheck * * * * Parameters: now - [IN] the current timestamp * @@ -3988,8 +3814,6 @@ void zbx_free_tag(zbx_tag_t *tag) /****************************************************************************** * * - * Function: zbx_md5buf2str * - * * * Purpose: get a textual representation of md5 sum * * * * Parameters: * @@ -4016,8 +3840,6 @@ void zbx_md5buf2str(const md5_byte_t *md5, char *str) /****************************************************************************** * * - * Function: zbx_hex2bin * - * * * Purpose: * * convert ASCII hex digit string to a binary representation (byte * * string) * diff --git a/src/libs/zbxcommon/setproctitle.c b/src/libs/zbxcommon/setproctitle.c index 71b969b45f7..9be327341ab 100644 --- a/src/libs/zbxcommon/setproctitle.c +++ b/src/libs/zbxcommon/setproctitle.c @@ -50,8 +50,6 @@ static size_t ps_buf_size = PS_BUF_SIZE, ps_buf_size_msg = PS_BUF_SIZE; /****************************************************************************** * * - * Function: setproctitle_save_env * - * * * Purpose: prepare for changing process commandline to display status * * messages with "ps" command on platforms which do not support * * setproctitle(). Depending on platform: * @@ -180,8 +178,6 @@ char **setproctitle_save_env(int argc, char **argv) /****************************************************************************** * * - * Function: setproctitle_set_status * - * * * Purpose: set a process command line displayed by "ps" command. * * * * Comments: call this function when a process starts some interesting task. * @@ -244,8 +240,6 @@ void setproctitle_set_status(const char *status) /****************************************************************************** * * - * Function: setproctitle_free_env * - * * * Purpose: release memory allocated in setproctitle_save_env(). * * * * Comments: call this function when process terminates and argv[] and * diff --git a/src/libs/zbxcommon/str.c b/src/libs/zbxcommon/str.c index c79981d36f5..63cdc4fb3f1 100644 --- a/src/libs/zbxcommon/str.c +++ b/src/libs/zbxcommon/str.c @@ -40,8 +40,6 @@ static const char help_message_footer[] = /****************************************************************************** * * - * Function: version * - * * * Purpose: print version and compilation time of application on stdout * * by application request with parameter '-V' * * * @@ -64,8 +62,6 @@ void version(void) /****************************************************************************** * * - * Function: usage * - * * * Purpose: print application parameters on stdout with layout suitable for * * 80-column terminal * * * @@ -122,8 +118,6 @@ void usage(void) /****************************************************************************** * * - * Function: help * - * * * Purpose: print help of application parameters on stdout by application * * request with parameter '-h' * * * @@ -149,8 +143,6 @@ void help(void) /****************************************************************************** * * - * Function: zbx_error * - * * * Purpose: Print error text to the stderr * * * * Parameters: fmt - format of message * @@ -176,8 +168,6 @@ void zbx_error(const char *fmt, ...) /****************************************************************************** * * - * Function: zbx_snprintf * - * * * Purpose: Secure version of snprintf function. * * Add zero character at the end of string. * * * @@ -204,8 +194,6 @@ size_t zbx_snprintf(char *str, size_t count, const char *fmt, ...) /****************************************************************************** * * - * Function: zbx_snprintf_alloc * - * * * Purpose: Secure version of snprintf function. * * Add zero character at the end of string. * * Reallocs memory if not enough. * @@ -254,8 +242,6 @@ retry: /****************************************************************************** * * - * Function: zbx_vsnprintf * - * * * Purpose: Secure version of vsnprintf function. * * Add zero character at the end of string. * * * @@ -287,8 +273,6 @@ size_t zbx_vsnprintf(char *str, size_t count, const char *fmt, va_list args) /****************************************************************************** * * - * Function: zbx_strncpy_alloc, zbx_strcpy_alloc, zbx_chrcpy_alloc * - * * * Purpose: If there is no '\0' byte among the first n bytes of src, * * then all n bytes will be placed into the dest buffer. * * In other case only strlen() bytes will be placed there. * @@ -462,8 +446,6 @@ char *string_replace(const char *str, const char *sub_str1, const char *sub_str2 /****************************************************************************** * * - * Function: del_zeros * - * * * Purpose: delete all right '0' and '.' for the string * * * * Parameters: s - string to trim '0' * @@ -529,8 +511,6 @@ void del_zeros(char *s) /****************************************************************************** * * - * Function: zbx_rtrim * - * * * Purpose: Strip characters from the end of a string * * * * Parameters: str - string for processing * @@ -560,8 +540,6 @@ int zbx_rtrim(char *str, const char *charlist) /****************************************************************************** * * - * Function: zbx_ltrim * - * * * Purpose: Strip characters from the beginning of a string * * * * Parameters: str - string for processing * @@ -593,8 +571,6 @@ void zbx_ltrim(char *str, const char *charlist) /****************************************************************************** * * - * Function: zbx_lrtrim * - * * * Purpose: Removes leading and trailing characters from the specified * * character string * * * @@ -610,8 +586,6 @@ void zbx_lrtrim(char *str, const char *charlist) /****************************************************************************** * * - * Function: zbx_remove_chars * - * * * Purpose: Remove characters 'charlist' from the whole string * * * * Parameters: str - string for processing * @@ -640,8 +614,6 @@ void zbx_remove_chars(char *str, const char *charlist) /****************************************************************************** * * - * Function: zbx_str_printable_dyn * - * * * Purpose: converts text to printable string by converting special * * characters to escape sequences * * * @@ -701,8 +673,6 @@ char *zbx_str_printable_dyn(const char *text) /****************************************************************************** * * - * Function: zbx_strlcpy * - * * * Purpose: Copy src to string dst of size siz. At most siz - 1 characters * * will be copied. Always null terminates (unless siz == 0). * * * @@ -726,8 +696,6 @@ size_t zbx_strlcpy(char *dst, const char *src, size_t siz) /****************************************************************************** * * - * Function: zbx_strlcat * - * * * Purpose: Appends src to string dst of size siz (unlike strncat, size is * * the full size of dst, not space left). At most siz - 1 characters * * will be copied. Always null terminates (unless * @@ -747,8 +715,6 @@ void zbx_strlcat(char *dst, const char *src, size_t siz) /****************************************************************************** * * - * Function: zbx_strlcpy_utf8 * - * * * Purpose: copies utf-8 string + terminating zero character into specified * * buffer * * * @@ -771,8 +737,6 @@ size_t zbx_strlcpy_utf8(char *dst, const char *src, size_t size) /****************************************************************************** * * - * Function: zbx_dvsprintf * - * * * Purpose: dynamical formatted output conversion * * * * Return value: formatted string * @@ -816,8 +780,6 @@ char *zbx_dvsprintf(char *dest, const char *f, va_list args) /****************************************************************************** * * - * Function: zbx_dsprintf * - * * * Purpose: dynamical formatted output conversion * * * * Return value: formatted string * @@ -843,8 +805,6 @@ char *zbx_dsprintf(char *dest, const char *f, ...) /****************************************************************************** * * - * Function: zbx_strdcat * - * * * Purpose: dynamical cating of strings * * * * Return value: new pointer of string * @@ -877,8 +837,6 @@ char *zbx_strdcat(char *dest, const char *src) /****************************************************************************** * * - * Function: zbx_strdcatf * - * * * Purpose: dynamical cating of formatted strings * * * * Return value: new pointer of string * @@ -906,8 +864,6 @@ char *zbx_strdcatf(char *dest, const char *f, ...) /****************************************************************************** * * - * Function: zbx_check_hostname * - * * * Purpose: check a byte stream for a valid hostname * * * * Parameters: hostname - pointer to the first char of hostname * @@ -955,8 +911,6 @@ int zbx_check_hostname(const char *hostname, char **error) /****************************************************************************** * * - * Function: parse_key * - * * * Purpose: advances pointer to first invalid character in string * * ensuring that everything before it is a valid key * * * @@ -1077,8 +1031,6 @@ succeed: /****************************************************************************** * * - * Function: parse_host_key * - * * * Purpose: return hostname and key * * <hostname:>key * * * @@ -1124,8 +1076,6 @@ int parse_host_key(char *exp, char **host, char **key) /****************************************************************************** * * - * Function: zbx_get_escape_string_len * - * * * Purpose: calculate the required size for the escaped string * * * * Parameters: src - [IN] null terminated source string * @@ -1151,8 +1101,6 @@ size_t zbx_get_escape_string_len(const char *src, const char *charlist) /****************************************************************************** * * - * Function: zbx_dyn_escape_string * - * * * Purpose: escape characters in the source string * * * * Parameters: src - [IN] null terminated source string * @@ -1187,8 +1135,6 @@ char *zbx_dyn_escape_string(const char *src, const char *charlist) /****************************************************************************** * * - * Function: zbx_escape_string * - * * * Purpose: escape characters in the source string to fixed output buffer * * * * Parameters: dst - [OUT] the output buffer * @@ -1333,8 +1279,6 @@ int cmp_key_id(const char *key_1, const char *key_2) /****************************************************************************** * * - * Function: get_process_type_string * - * * * Purpose: Returns process name * * * * Parameters: proc_type - [IN] process type; ZBX_PROCESS_TYPE_* * @@ -2132,8 +2076,6 @@ char *zbx_strshift_utf8(char *text, size_t num) /****************************************************************************** * * - * Function: zbx_utf8_char_len * - * * * Purpose: Returns the size (in bytes) of an UTF-8 encoded character or 0 * * if the character is not a valid UTF-8. * * * @@ -2158,8 +2100,6 @@ size_t zbx_utf8_char_len(const char *text) /****************************************************************************** * * - * Function: zbx_strlen_utf8_nchars * - * * * Purpose: calculates number of bytes in utf8 text limited by utf8_maxlen * * characters * * * @@ -2186,8 +2126,6 @@ size_t zbx_strlen_utf8_nchars(const char *text, size_t utf8_maxlen) /****************************************************************************** * * - * Function: zbx_strlen_utf8_nbytes * - * * * Purpose: calculates number of bytes in utf8 text limited by maxlen bytes * * * ******************************************************************************/ @@ -2211,8 +2149,6 @@ size_t zbx_strlen_utf8_nbytes(const char *text, size_t maxlen) /****************************************************************************** * * - * Function: zbx_charcount_utf8_nbytes * - * * * Purpose: calculates number of chars in utf8 text limited by maxlen bytes * * * ******************************************************************************/ @@ -2235,8 +2171,6 @@ size_t zbx_charcount_utf8_nbytes(const char *text, size_t maxlen) /****************************************************************************** * * - * Function: zbx_is_utf8 * - * * * Purpose: check UTF-8 sequences * * * * Parameters: text - [IN] pointer to the string * @@ -2330,8 +2264,6 @@ int zbx_is_utf8(const char *text) /****************************************************************************** * * - * Function: zbx_replace_invalid_utf8 * - * * * Purpose: replace invalid UTF-8 sequences of bytes with '?' character * * * * Parameters: text - [IN/OUT] pointer to the first char * @@ -2438,8 +2370,6 @@ void zbx_replace_invalid_utf8(char *text) /****************************************************************************** * * - * Function: utf8_decode_3byte_sequence * - * * * Purpose: decodes 3-byte utf-8 sequence * * * * Parameters: ptr - [IN] pointer to the 3 byte sequence * @@ -2465,8 +2395,6 @@ static int utf8_decode_3byte_sequence(const char *ptr, zbx_uint32_t *out) /****************************************************************************** * * - * Function: zbx_cesu8_to_utf8 * - * * * Purpose: convert cesu8 encoded string to utf8 * * * * Parameters: cesu8 - [IN] pointer to the first char of NULL terminated CESU8* @@ -2574,8 +2502,6 @@ int is_ascii_string(const char *str) /****************************************************************************** * * - * Function: str_linefeed * - * * * Purpose: wrap long string at specified position with linefeeds * * * * Parameters: src - input string * @@ -2644,8 +2570,6 @@ char *str_linefeed(const char *src, size_t maxline, const char *delim) /****************************************************************************** * * - * Function: zbx_strarr_init * - * * * Purpose: initialize dynamic string array * * * * Parameters: arr - a pointer to array of strings * @@ -2665,8 +2589,6 @@ void zbx_strarr_init(char ***arr) /****************************************************************************** * * - * Function: zbx_strarr_add * - * * * Purpose: add a string to dynamic string array * * * * Parameters: arr - a pointer to array of strings * @@ -2696,8 +2618,6 @@ void zbx_strarr_add(char ***arr, const char *entry) /****************************************************************************** * * - * Function: zbx_strarr_free * - * * * Purpose: free dynamic string array memory * * * * Parameters: arr - array of strings * @@ -2718,8 +2638,6 @@ void zbx_strarr_free(char ***arr) /****************************************************************************** * * - * Function: zbx_replace_string * - * * * Purpose: replace data block with 'value' * * * * Parameters: data - [IN/OUT] pointer to the string * @@ -2759,8 +2677,6 @@ void zbx_replace_string(char **data, size_t l, size_t *r, const char *value) /****************************************************************************** * * - * Function: zbx_trim_str_list * - * * * Purpose: remove whitespace surrounding a string list item delimiters * * * * Parameters: list - the list (a string containing items separated by * @@ -2803,8 +2719,6 @@ void zbx_trim_str_list(char *list, char delimiter) /****************************************************************************** * * - * Function: zbx_strcmp_null * - * * * Purpose: * * compares two strings where any of them can be a NULL pointer * * * @@ -2828,8 +2742,6 @@ int zbx_strcmp_null(const char *s1, const char *s2) /****************************************************************************** * * - * Function: zbx_user_macro_parse * - * * * Purpose: * * parses user macro and finds its end position and context location * * * @@ -2942,8 +2854,6 @@ int zbx_user_macro_parse(const char *macro, int *macro_r, int *context_l, int *c /****************************************************************************** * * - * Function: zbx_user_macro_parse_dyn * - * * * Purpose: * * parses user macro {$MACRO:<context>} into {$MACRO} and <context> * * strings * @@ -3009,8 +2919,6 @@ int zbx_user_macro_parse_dyn(const char *macro, char **name, char **context, int /****************************************************************************** * * - * Function: zbx_user_macro_unquote_context_dyn * - * * * Purpose: * * extracts the macro context unquoting if necessary * * * @@ -3060,8 +2968,6 @@ char *zbx_user_macro_unquote_context_dyn(const char *context, int len) /****************************************************************************** * * - * Function: zbx_user_macro_quote_context_dyn * - * * * Purpose: * * quotes user macro context if necessary * * * @@ -3123,8 +3029,6 @@ char *zbx_user_macro_quote_context_dyn(const char *context, int force_quote, cha /****************************************************************************** * * - * Function: zbx_dyn_escape_shell_single_quote * - * * * Purpose: escape single quote in shell command arguments * * * * Parameters: arg - [IN] the argument to escape * @@ -3167,8 +3071,6 @@ char *zbx_dyn_escape_shell_single_quote(const char *arg) /****************************************************************************** * * - * Function: function_parse_name * - * * * Purpose: parses function name * * * * Parameters: expr - [IN] the function expression: func(p1, p2,...) * @@ -3193,8 +3095,6 @@ static int function_parse_name(const char *expr, size_t *length) /****************************************************************************** * * - * Function: zbx_function_param_parse * - * * * Purpose: parses function parameter * * * * Parameters: expr - [IN] pre-validated function parameter list * @@ -3240,8 +3140,6 @@ void zbx_function_param_parse(const char *expr, size_t *param_pos, size_t *lengt /****************************************************************************** * * - * Function: zbx_function_param_unquote_dyn * - * * * Purpose: unquotes function parameter * * * * Parameters: param - [IN] the parameter to unquote * @@ -3287,8 +3185,6 @@ char *zbx_function_param_unquote_dyn(const char *param, size_t len, int *quoted) /****************************************************************************** * * - * Function: zbx_function_param_quote * - * * * Purpose: quotes function parameter * * * * Parameters: param - [IN/OUT] function parameter * @@ -3336,8 +3232,6 @@ int zbx_function_param_quote(char **param, int forced) /****************************************************************************** * * - * Function: zbx_function_get_param_dyn * - * * * Purpose: return parameter by index (Nparam) from parameter list (params) * * * * Parameters: * @@ -3374,8 +3268,6 @@ char *zbx_function_get_param_dyn(const char *params, int Nparam) /****************************************************************************** * * - * Function: function_validate_parameters * - * * * Purpose: validate parameters and give position of terminator if found and * * not quoted * * * @@ -3468,8 +3360,6 @@ static int function_validate_parameters(const char *expr, char terminator, size_ /****************************************************************************** * * - * Function: function_match_parenthesis * - * * * Purpose: given the position of opening function parenthesis find the * * position of a closing one * * * @@ -3499,8 +3389,6 @@ static int function_match_parenthesis(const char *expr, size_t par_l, size_t *pa /****************************************************************************** * * - * Function: zbx_function_validate_parameters * - * * * Purpose: validate parameters that end with '\0' * * * * Parameters: expr - [IN] string to parse that contains parameters * @@ -3521,8 +3409,6 @@ int zbx_function_validate_parameters(const char *expr, size_t *length) /****************************************************************************** * * - * Function: zbx_function_validate * - * * * Purpose: check whether expression starts with a valid function * * * * Parameters: expr - [IN] string to parse * @@ -3566,8 +3452,6 @@ static int zbx_function_validate(const char *expr, size_t *par_l, size_t *par_r, /****************************************************************************** * * - * Function: zbx_strcmp_natural * - * * * Purpose: performs natural comparison of two strings * * * * Parameters: s1 - [IN] the first string * @@ -3612,8 +3496,6 @@ int zbx_strcmp_natural(const char *s1, const char *s2) /****************************************************************************** * * - * Function: token_parse_user_macro * - * * * Purpose: parses user macro token * * * * Parameters: expression - [IN] the expression * @@ -3673,8 +3555,6 @@ static int token_parse_user_macro(const char *expression, const char *macro, zbx /****************************************************************************** * * - * Function: token_parse_lld_macro * - * * * Purpose: parses lld macro token * * * * Parameters: expression - [IN] the expression * @@ -3726,8 +3606,6 @@ static int token_parse_lld_macro(const char *expression, const char *macro, zbx_ /****************************************************************************** * * - * Function: token_parse_expression_macro * - * * * Purpose: parses expression macro token * * * * Parameters: expression - [IN] the expression * @@ -3827,8 +3705,6 @@ static int token_parse_expression_macro(const char *expression, const char *macr /****************************************************************************** * * - * Function: token_parse_objectid * - * * * Purpose: parses object id token * * * * Parameters: expression - [IN] the expression * @@ -3880,8 +3756,6 @@ static int token_parse_objectid(const char *expression, const char *macro, zbx_t /****************************************************************************** * * - * Function: token_parse_macro_segment * - * * * Purpose: parses macro name segment * * * * Parameters: expression - [IN] the expression * @@ -3955,8 +3829,6 @@ static int token_parse_macro_segment(const char *expression, const char *segment /****************************************************************************** * * - * Function: token_parse_macro_name * - * * * Purpose: parses macro name * * * * Parameters: expression - [IN] the expression * @@ -3996,8 +3868,6 @@ static int token_parse_macro_name(const char *expression, const char *ptr, zbx_s /****************************************************************************** * * - * Function: token_parse_macro * - * * * Purpose: parses normal macro token * * * * Parameters: expression - [IN] the expression * @@ -4037,8 +3907,6 @@ static int token_parse_macro(const char *expression, const char *macro, zbx_toke /****************************************************************************** * * - * Function: token_parse_function * - * * * Purpose: parses function inside token * * * * Parameters: expression - [IN] the expression * @@ -4069,8 +3937,6 @@ static int token_parse_function(const char *expression, const char *func, /****************************************************************************** * * - * Function: token_parse_func_macro * - * * * Purpose: parses function macro token * * * * Parameters: expression - [IN] the expression * @@ -4135,8 +4001,6 @@ static int token_parse_func_macro(const char *expression, const char *macro, con /****************************************************************************** * * - * Function: token_parse_simple_macro_key * - * * * Purpose: parses simple macro token with given key * * * * Parameters: expression - [IN] the expression * @@ -4224,8 +4088,6 @@ static int token_parse_simple_macro_key(const char *expression, const char *macr /****************************************************************************** * * - * Function: token_parse_simple_macro * - * * * Purpose: parses simple macro token * * * * Parameters: expression - [IN] the expression * @@ -4269,8 +4131,6 @@ static int token_parse_simple_macro(const char *expression, const char *macro, z /****************************************************************************** * * - * Function: token_parse_nested_macro * - * * * Purpose: parses token with nested macros * * * * Parameters: expression - [IN] the expression * @@ -4366,8 +4226,6 @@ static int token_parse_nested_macro(const char *expression, const char *macro, i /****************************************************************************** * * - * Function: zbx_token_find * - * * * Purpose: finds token {} inside expression starting at specified position * * also searches for reference if requested * * * @@ -4500,8 +4358,6 @@ int zbx_token_find(const char *expression, int pos, zbx_token_t *token, zbx_toke /****************************************************************************** * * - * Function: zbx_token_parse_user_macro * - * * * Purpose: public wrapper for token_parse_user_macro() function * * * ******************************************************************************/ @@ -4512,8 +4368,6 @@ int zbx_token_parse_user_macro(const char *expression, const char *macro, zbx_to /****************************************************************************** * * - * Function: zbx_token_parse_macro * - * * * Purpose: public wrapper for token_parse_macro() function * * * ******************************************************************************/ @@ -4524,8 +4378,6 @@ int zbx_token_parse_macro(const char *expression, const char *macro, zbx_token_t /****************************************************************************** * * - * Function: zbx_token_parse_objectid * - * * * Purpose: public wrapper for token_parse_objectid() function * * * ******************************************************************************/ @@ -4536,8 +4388,6 @@ int zbx_token_parse_objectid(const char *expression, const char *macro, zbx_toke /****************************************************************************** * * - * Function: zbx_token_parse_lld_macro * - * * * Purpose: public wrapper for token_parse_lld_macro() function * * * ******************************************************************************/ @@ -4548,8 +4398,6 @@ int zbx_token_parse_lld_macro(const char *expression, const char *macro, zbx_tok /****************************************************************************** * * - * Function: zbx_token_parse_nested_macro * - * * * Purpose: public wrapper for token_parse_nested_macro() function * * * ******************************************************************************/ @@ -4561,8 +4409,6 @@ int zbx_token_parse_nested_macro(const char *expression, const char *macro, int /****************************************************************************** * * - * Function: zbx_no_function * - * * * Purpose: count calculated item (prototype) formula characters that can be * * skipped without the risk of missing a function * * * @@ -4628,8 +4474,6 @@ static size_t zbx_no_function(const char *expr) /****************************************************************************** * * - * Function: zbx_function_find * - * * * Purpose: find the location of the next function and its parameters in * * calculated item (prototype) formula * * * @@ -4678,8 +4522,6 @@ int zbx_function_find(const char *expr, size_t *func_pos, size_t *par_l, size_t /****************************************************************************** * * - * Function: zbx_strmatch_condition * - * * * Purpose: check if pattern matches the specified value * * * * Parameters: value - [IN] the value to match * @@ -4718,8 +4560,6 @@ int zbx_strmatch_condition(const char *value, const char *pattern, unsigned char /****************************************************************************** * * - * Function: zbx_number_parse * - * * * Purpose: parse a number like "12.345" * * * * Parameters: number - [IN] start of number * @@ -4780,8 +4620,6 @@ int zbx_number_parse(const char *number, int *len) /****************************************************************************** * * - * Function: zbx_suffixed_number_parse * - * * * Purpose: parse a suffixed number like "12.345K" * * * * Parameters: number - [IN] start of number * @@ -4808,8 +4646,6 @@ int zbx_suffixed_number_parse(const char *number, int *len) /****************************************************************************** * * - * Function: num_param * - * * * Purpose: find number of parameters in parameter list * * * * Parameters: * @@ -4908,8 +4744,6 @@ int num_param(const char *p) /****************************************************************************** * * - * Function: get_param * - * * * Purpose: return parameter by index (num) from parameter list (param) * * * * Parameters: * @@ -5079,8 +4913,6 @@ int get_param(const char *p, int num, char *buf, size_t max_len, zbx_request_par /****************************************************************************** * * - * Function: get_param_len * - * * * Purpose: return length of the parameter by index (num) * * from parameter list (param) * * * @@ -5211,8 +5043,6 @@ static int get_param_len(const char *p, int num, size_t *sz) /****************************************************************************** * * - * Function: get_param_dyn * - * * * Purpose: return parameter by index (num) from parameter list (param) * * * * Parameters: * @@ -5248,8 +5078,6 @@ char *get_param_dyn(const char *p, int num, zbx_request_parameter_type_t *type) /****************************************************************************** * * - * Function: replace_key_param * - * * * Purpose: replaces an item key, SNMP OID or their parameters when callback * * function returns a new string * * * @@ -5280,8 +5108,6 @@ static int replace_key_param(char **data, int key_type, size_t l, size_t *r, int /****************************************************************************** * * - * Function: replace_key_params_dyn * - * * * Purpose: replaces an item key, SNMP OID or their parameters by using * * callback function * * * @@ -5445,8 +5271,6 @@ clean: /****************************************************************************** * * - * Function: remove_param * - * * * Purpose: remove parameter by index (num) from parameter list (param) * * * * Parameters: * @@ -5494,8 +5318,6 @@ void remove_param(char *param, int num) /****************************************************************************** * * - * Function: str_n_in_list * - * * * Purpose: check if string is contained in a list of delimited strings * * * * Parameters: list - [IN] strings a,b,ccc,ddd * @@ -5538,8 +5360,6 @@ int str_n_in_list(const char *list, const char *value, size_t len, char delimite /****************************************************************************** * * - * Function: str_in_list * - * * * Purpose: check if string is contained in a list of delimited strings * * * * Parameters: list - strings a,b,ccc,ddd * @@ -5558,8 +5378,6 @@ int str_in_list(const char *list, const char *value, char delimiter) /****************************************************************************** * * - * Function: get_key_param * - * * * Purpose: return parameter by index (num) from parameter list (param) * * to be used for keys: key[param1,param2] * * * @@ -5598,8 +5416,6 @@ int get_key_param(char *param, int num, char *buf, size_t max_len) /****************************************************************************** * * - * Function: num_key_param * - * * * Purpose: calculate count of parameters from parameter list (param) * * to be used for keys: key[param1,param2] * * * @@ -5636,8 +5452,6 @@ int num_key_param(char *param) /****************************************************************************** * * - * Function: zbx_replace_mem_dyn * - * * * Purpose: to replace memory block and allocate more memory if needed * * * * Parameters: data - [IN/OUT] allocated memory * @@ -5681,8 +5495,6 @@ int zbx_replace_mem_dyn(char **data, size_t *data_alloc, size_t *data_len, size_ /****************************************************************************** * * - * Function: zbx_strsplit * - * * * Purpose: splits string * * * * Parameters: src - [IN] source string * @@ -5720,8 +5532,6 @@ void zbx_strsplit(const char *src, char delimiter, char **left, char **right) /****************************************************************************** * * - * Function: zbx_trim_number * - * * * Purpose: Removes spaces from both ends of the string, then unquotes it if * * double quotation mark is present on both ends of the string. If * * strip_plus_sign is non-zero, then removes single "+" sign from * @@ -5791,8 +5601,6 @@ static void zbx_trim_number(char *str, int strip_plus_sign) /****************************************************************************** * * - * Function: zbx_trim_integer * - * * * Purpose: Removes spaces from both ends of the string, then unquotes it if * * double quotation mark is present on both ends of the string, then * * removes single "+" sign from the beginning of the trimmed and * @@ -5813,8 +5621,6 @@ void zbx_trim_integer(char *str) /****************************************************************************** * * - * Function: zbx_trim_float * - * * * Purpose: Removes spaces from both ends of the string, then unquotes it if * * double quotation mark is present on both ends of the string. * * * @@ -5833,8 +5639,6 @@ void zbx_trim_float(char *str) /****************************************************************************** * * - * Function: zbx_get_component_version * - * * * Purpose: extracts protocol version from value * * * * Parameters: * @@ -5861,8 +5665,6 @@ int zbx_get_component_version(char *value) /****************************************************************************** * * - * Function: zbx_str_extract * - * * * Purpose: extracts value from a string, unquoting if necessary * * * * Parameters: * @@ -5931,8 +5733,6 @@ fail: /****************************************************************************** * * - * Function: zbx_truncate_itemkey * - * * * Purpose: check the item key characters length and, if the length exceeds * * max allowable characters length, truncate the item key, while * * maintaining the right square bracket * @@ -6027,8 +5827,6 @@ const char *zbx_truncate_itemkey(const char *key, const size_t char_max, char *b /****************************************************************************** * * - * Function: zbx_truncate_value * - * * * Purpose: check the value characters length and, if the length exceeds * * max allowable characters length, truncate the value * * * @@ -6064,8 +5862,6 @@ const char *zbx_truncate_value(const char *val, const size_t char_max, char *buf /****************************************************************************** * * - * Function: zbx_print_double * - * * * Purpose: converts double value to string and truncates insignificant * * precision * * * @@ -6088,8 +5884,6 @@ const char *zbx_print_double(char *buffer, size_t size, double val) /****************************************************************************** * * - * Function: zbx_substr_unquote * - * * * Purpose: unquotes valid substring at the specified location * * * * Parameters: src - [IN] the source string * @@ -6145,8 +5939,6 @@ char *zbx_substr_unquote(const char *src, size_t left, size_t right) /****************************************************************************** * * - * Function: zbx_substr * - * * * Purpose: extracts substring at the specified location * * * * Parameters: src - [IN] the source string * @@ -6169,8 +5961,6 @@ char *zbx_substr(const char *src, size_t left, size_t right) /****************************************************************************** * * - * Function: utf8_chr_next * - * * * Purpose: return pointer to the next utf-8 character * * * * Parameters: str - [IN] the input string * @@ -6190,8 +5980,6 @@ static const char *utf8_chr_next(const char *str) /****************************************************************************** * * - * Function: utf8_chr_prev * - * * * Purpose: return pointer to the previous utf-8 character * * * * Parameters: str - [IN] the input string * @@ -6214,8 +6002,6 @@ static char *utf8_chr_prev(char *str, const char *start) /****************************************************************************** * * - * Function: strchr_utf8 * - * * * Purpose: checks if string contains utf-8 character * * * * Parameters: seq - [IN] the input string * @@ -6254,8 +6040,6 @@ static int strchr_utf8(const char *seq, const char *c) /****************************************************************************** * * - * Function: zbx_ltrim_utf8 * - * * * Purpose: trim the specified utf-8 characters from the left side of input * * string * * * @@ -6286,8 +6070,6 @@ void zbx_ltrim_utf8(char *str, const char *charlist) /****************************************************************************** * * - * Function: zbx_rtrim_utf8 * - * * * Purpose: trim the specified utf-8 characters from the right side of input * * string * * * diff --git a/src/libs/zbxcommon/time.c b/src/libs/zbxcommon/time.c index c996533adef..89e1d6f6d04 100644 --- a/src/libs/zbxcommon/time.c +++ b/src/libs/zbxcommon/time.c @@ -50,8 +50,6 @@ zbx_time_unit_t zbx_tm_str_to_unit(const char *text) /****************************************************************************** * * - * Function: zbx_tm_parse_period * - * * * Purpose: parse time period in format <multiplier><time unit> * * * * Parameters: period - [IN] the time period * @@ -90,8 +88,6 @@ int zbx_tm_parse_period(const char *period, size_t *len, int *multiplier, zbx_ti /****************************************************************************** * * - * Function: tm_add_seconds * - * * * Purpose: add seconds to the time and adjust result by dst * * * * Parameter: tm - [IN/OUT] the time structure * @@ -125,8 +121,6 @@ static void tm_add_seconds(struct tm *tm, int seconds) /****************************************************************************** * * - * Function: tm_add * - * * * Purpose: add time duration without adjusting DST clocks * * * * Parameter: tm - [IN/OUT] the time structure * @@ -181,8 +175,6 @@ static void tm_add(struct tm *tm, int multiplier, zbx_time_unit_t base) /****************************************************************************** * * - * Function: zbx_tm_add * - * * * Purpose: add time duration * * * * Parameter: tm - [IN/OUT] the time structure * @@ -210,8 +202,6 @@ void zbx_tm_add(struct tm *tm, int multiplier, zbx_time_unit_t base) /****************************************************************************** * * - * Function: neg_to_pos_wrap * - * * * Purpose: convert negative number to positive by wrapping around the base * * * * Parameter: value - [IN/OUT] the value to convert * @@ -227,8 +217,6 @@ static void neg_to_pos_wrap(int *value, int base) /****************************************************************************** * * - * Function: tm_sub * - * * * Purpose: subtracts time duration without adjusting DST clocks * * * * Parameter: tm - [IN/OUT] the time structure * @@ -294,8 +282,6 @@ static void tm_sub(struct tm *tm, int multiplier, zbx_time_unit_t base) /****************************************************************************** * * - * Function: zbx_tm_sub * - * * * Purpose: subtracts time duration * * * * Parameter: tm - [IN/OUT] the time structure * @@ -337,8 +323,6 @@ void zbx_tm_sub(struct tm *tm, int multiplier, zbx_time_unit_t base) /****************************************************************************** * * - * Function: zbx_tm_round_up * - * * * Purpose: rounds time by the specified unit upwards * * * * Parameter: tm - [IN/OUT] the time structure * @@ -404,8 +388,6 @@ void zbx_tm_round_up(struct tm *tm, zbx_time_unit_t base) /****************************************************************************** * * - * Function: zbx_tm_round_down * - * * * Purpose: rounds time by the specified unit downwards * * * * Parameter: tm - [IN/OUT] the time structure * @@ -476,8 +458,6 @@ static int get_week_days(int yday, int wday) /****************************************************************************** * * - * Function: zbx_get_week_number * - * * * Purpose: get ISO 8061 week number (1-53) * * * ******************************************************************************/ diff --git a/src/libs/zbxcommon/variant.c b/src/libs/zbxcommon/variant.c index 18a35eb3948..bee95769493 100644 --- a/src/libs/zbxcommon/variant.c +++ b/src/libs/zbxcommon/variant.c @@ -135,8 +135,6 @@ void zbx_variant_set_dbl_vector(zbx_variant_t *value, zbx_vector_dbl_t *dbl_vect /****************************************************************************** * * - * Function: zbx_variant_copy * - * * * Purpose: copy variant contents from source to value * * * * Comments: String and binary data are cloned, which is different from * @@ -412,8 +410,6 @@ int zbx_validate_value_dbl(double value, int dbl_precision) /****************************************************************************** * * - * Function: variant_compare_empty * - * * * Purpose: compares two variant values when at least one is empty (having * * type of ZBX_VARIANT_NONE) * * * @@ -433,8 +429,6 @@ static int variant_compare_empty(const zbx_variant_t *value1, const zbx_variant_ /****************************************************************************** * * - * Function: variant_compare_bin * - * * * Purpose: compare two variant values when at least one contains binary data * * * ******************************************************************************/ @@ -458,8 +452,6 @@ static int variant_compare_bin(const zbx_variant_t *value1, const zbx_variant_t /****************************************************************************** * * - * Function: variant_compare_error * - * * * Purpose: compare two variant values when at least one contains error * * * ******************************************************************************/ @@ -478,8 +470,6 @@ static int variant_compare_error(const zbx_variant_t *value1, const zbx_variant_ /****************************************************************************** * * - * Function: variant_compare_dbl_vector * - * * * Purpose: compare two variant values when at least one contains error * * * ******************************************************************************/ @@ -506,8 +496,6 @@ static int variant_compare_dbl_vector(const zbx_variant_t *value1, const zbx_var } /****************************************************************************** * * - * Function: variant_compare_str * - * * * Purpose: compare two variant values when at least one is string * * * ******************************************************************************/ @@ -521,8 +509,6 @@ static int variant_compare_str(const zbx_variant_t *value1, const zbx_variant_t /****************************************************************************** * * - * Function: variant_compare_dbl * - * * * Purpose: compare two variant values when at least one is double and the * * other is double, uint64 or a string representing a valid double * * value * @@ -581,8 +567,6 @@ static int variant_compare_dbl(const zbx_variant_t *value1, const zbx_variant_t /****************************************************************************** * * - * Function: variant_compare_ui64 * - * * * Purpose: compare two variant values when both are uint64 * * * ******************************************************************************/ @@ -594,8 +578,6 @@ static int variant_compare_ui64(const zbx_variant_t *value1, const zbx_variant_t /****************************************************************************** * * - * Function: zbx_variant_compare * - * * * Purpose: compare two variant values * * * * Parameters: value1 - [IN] the first value * diff --git a/src/libs/zbxcommon/variant_misc.c b/src/libs/zbxcommon/variant_misc.c index 87272b3f27f..e6ba4458b7e 100644 --- a/src/libs/zbxcommon/variant_misc.c +++ b/src/libs/zbxcommon/variant_misc.c @@ -22,8 +22,6 @@ /****************************************************************************** * * - * Function: zbx_variant_to_value_type * - * * * Purpose: converts variant value to type compatible with requested value * * type * * * diff --git a/src/libs/zbxcomms/comms.c b/src/libs/zbxcomms/comms.c index 2a56b617c12..b03c52f0d50 100644 --- a/src/libs/zbxcomms/comms.c +++ b/src/libs/zbxcomms/comms.c @@ -52,8 +52,6 @@ extern int CONFIG_TCP_MAX_BACKLOG_SIZE; /****************************************************************************** * * - * Function: zbx_socket_strerror * - * * * Purpose: return string describing tcp error * * * * Return value: pointer to the null terminated string * @@ -86,8 +84,6 @@ static void zbx_set_socket_strerror(const char *fmt, ...) /****************************************************************************** * * - * Function: zbx_socket_peer_ip_save * - * * * Purpose: get peer IP address info from a socket early while it is * * connected. Connection can be terminated due to various errors at * * any time and peer IP address will not be available anymore. * @@ -129,8 +125,6 @@ static int zbx_socket_peer_ip_save(zbx_socket_t *s) #ifndef _WINDOWS /****************************************************************************** * * - * Function: zbx_gethost_by_ip * - * * * Purpose: retrieve 'hostent' by IP address * * * * Author: Alexei Vladishev * @@ -187,8 +181,6 @@ void zbx_gethost_by_ip(const char *ip, char *host, size_t hostlen) /****************************************************************************** * * - * Function: zbx_getip_by_host * - * * * Purpose: retrieve IP address by host name * * * ******************************************************************************/ @@ -228,8 +220,6 @@ out: #ifdef _WINDOWS /****************************************************************************** * * - * Function: zbx_is_win_ver_or_greater * - * * * Purpose: check Windows version * * * * Parameters: major - [IN] major windows version * @@ -261,8 +251,6 @@ static int zbx_is_win_ver_or_greater(zbx_uint32_t major, zbx_uint32_t minor, zbx /****************************************************************************** * * - * Function: zbx_socket_start * - * * * Purpose: Initialize Windows Sockets APIs * * * * Parameters: error - [OUT] the error message * @@ -290,8 +278,6 @@ int zbx_socket_start(char **error) /****************************************************************************** * * - * Function: zbx_socket_clean * - * * * Purpose: initialize socket * * * * Author: Alexei Vladishev * @@ -306,8 +292,6 @@ static void zbx_socket_clean(zbx_socket_t *s) /****************************************************************************** * * - * Function: zbx_socket_free * - * * * Purpose: free socket's dynamic buffer * * * * Author: Alexei Vladishev * @@ -321,8 +305,6 @@ static void zbx_socket_free(zbx_socket_t *s) /****************************************************************************** * * - * Function: zbx_socket_timeout_set * - * * * Purpose: set timeout for socket operations * * * * Parameters: s - [IN] socket descriptor * @@ -355,8 +337,6 @@ void zbx_socket_timeout_set(zbx_socket_t *s, int timeout) /****************************************************************************** * * - * Function: zbx_socket_timeout_cleanup * - * * * Purpose: clean up timeout for socket operations * * * * Parameters: s - [OUT] socket descriptor * @@ -377,8 +357,6 @@ static void zbx_socket_timeout_cleanup(zbx_socket_t *s) /****************************************************************************** * * - * Function: zbx_socket_connect * - * * * Purpose: connect to the specified address with an optional timeout value * * * * Parameters: s - [IN] socket descriptor * @@ -488,8 +466,6 @@ static int zbx_socket_connect(zbx_socket_t *s, const struct sockaddr *addr, sock /****************************************************************************** * * - * Function: zbx_socket_create * - * * * Purpose: connect the socket of the specified type to external host * * * * Parameters: s - [OUT] socket descriptor * @@ -793,8 +769,6 @@ static ssize_t zbx_tcp_write(zbx_socket_t *s, const char *buf, size_t len) /****************************************************************************** * * - * Function: zbx_tcp_send_ext * - * * * Purpose: send data * * * * Return value: SUCCEED - success * @@ -951,8 +925,6 @@ cleanup: /****************************************************************************** * * - * Function: zbx_tcp_close * - * * * Purpose: close open TCP socket * * * * Author: Alexei Vladishev * @@ -970,8 +942,6 @@ void zbx_tcp_close(zbx_socket_t *s) /****************************************************************************** * * - * Function: get_address_family * - * * * Purpose: return address family * * * * Parameters: addr - [IN] address or hostname * @@ -1021,8 +991,6 @@ out: /****************************************************************************** * * - * Function: zbx_tcp_listen * - * * * Purpose: create socket for listening * * * * Return value: SUCCEED - success * @@ -1410,8 +1378,6 @@ void zbx_tcp_unlisten(zbx_socket_t *s) /****************************************************************************** * * - * Function: zbx_tcp_accept * - * * * Purpose: permits an incoming connection attempt on a socket * * * * Return value: SUCCEED - success * @@ -1535,8 +1501,6 @@ out: /****************************************************************************** * * - * Function: zbx_tcp_unaccept * - * * * Purpose: close accepted connection * * * * Author: Eugene Grigorjev * @@ -1561,8 +1525,6 @@ void zbx_tcp_unaccept(zbx_socket_t *s) /****************************************************************************** * * - * Function: zbx_socket_find_line * - * * * Purpose: finds the next line in socket data buffer * * * * Parameters: s - [IN] the socket * @@ -1595,8 +1557,6 @@ static const char *zbx_socket_find_line(zbx_socket_t *s) /****************************************************************************** * * - * Function: zbx_tcp_recv_line * - * * * Purpose: reads next line from a socket * * * * Parameters: s - [IN] the socket * @@ -1768,8 +1728,6 @@ static ssize_t zbx_tcp_read(zbx_socket_t *s, char *buf, size_t len) /****************************************************************************** * * - * Function: zbx_tcp_recv_ext * - * * * Purpose: receive data * * * * Return value: number of bytes received - success, * @@ -2035,8 +1993,6 @@ out: /****************************************************************************** * * - * Function: zbx_tcp_recv_raw_ext * - * * * Purpose: receive data till connection is closed * * * * Return value: number of bytes received - success, * @@ -2145,8 +2101,6 @@ static int subnet_match(int af, unsigned int prefix_size, const void *address1, /****************************************************************************** * * - * Function: zbx_ip_cmp * - * * * Purpose: check if the address belongs to the given subnet * * * * Parameters: prefix_size - [IN] subnet prefix size * @@ -2299,8 +2253,6 @@ int zbx_validate_peer_list(const char *peer_list, char **error) /****************************************************************************** * * - * Function: zbx_tcp_check_allowed_peers * - * * * Purpose: check if connection initiator is in list of peers * * * * Parameters: s - [IN] socket descriptor * @@ -2383,8 +2335,6 @@ int zbx_tcp_check_allowed_peers(const zbx_socket_t *s, const char *peer_list) /****************************************************************************** * * - * Function: zbx_tcp_connection_type_name * - * * * Purpose: translate connection type code to name * * * ******************************************************************************/ diff --git a/src/libs/zbxcommshigh/comms.c b/src/libs/zbxcommshigh/comms.c index e15b3a2a08d..e82630f8f8c 100644 --- a/src/libs/zbxcommshigh/comms.c +++ b/src/libs/zbxcommshigh/comms.c @@ -137,8 +137,6 @@ void disconnect_server(zbx_socket_t *sock) /****************************************************************************** * * - * Function: get_data_from_server * - * * * Purpose: get configuration and other data from server * * * * Return value: SUCCEED - processed successfully * @@ -176,8 +174,6 @@ exit: /****************************************************************************** * * - * Function: put_data_to_server * - * * * Purpose: send data to server * * * * Return value: SUCCEED - processed successfully * @@ -210,8 +206,6 @@ out: /****************************************************************************** * * - * Function: zbx_send_response * - * * * Purpose: send json SUCCEED or FAIL to socket along with an info message * * * * Parameters: sock - [IN] socket descriptor * @@ -268,8 +262,6 @@ int zbx_send_response_ext(zbx_socket_t *sock, int result, const char *info, cons /****************************************************************************** * * - * Function: zbx_recv_response * - * * * Purpose: read a response message (in JSON format) from socket, optionally * * extract "info" value. * * * diff --git a/src/libs/zbxcompress/compress.c b/src/libs/zbxcompress/compress.c index bb20c1ab3da..3971cd96974 100644 --- a/src/libs/zbxcompress/compress.c +++ b/src/libs/zbxcompress/compress.c @@ -30,8 +30,6 @@ static int zbx_zlib_errno = 0; /****************************************************************************** * * - * Function: zbx_compress_strerror * - * * * Purpose: returns last conversion error message * * * ******************************************************************************/ @@ -63,8 +61,6 @@ const char *zbx_compress_strerror(void) /****************************************************************************** * * - * Function: zbx_compress * - * * * Purpose: compress data * * * * Parameters: in - [IN] the data to compress * @@ -101,8 +97,6 @@ int zbx_compress(const char *in, size_t size_in, char **out, size_t *size_out) /****************************************************************************** * * - * Function: zbx_uncompress * - * * * Purpose: uncompress data * * * * Parameters: in - [IN] the data to uncompress * diff --git a/src/libs/zbxconf/cfg.c b/src/libs/zbxconf/cfg.c index 46fd3598fec..d74e28e0d19 100644 --- a/src/libs/zbxconf/cfg.c +++ b/src/libs/zbxconf/cfg.c @@ -38,8 +38,6 @@ static int __parse_cfg_file(const char *cfg_file, struct cfg_line *cfg, int leve /****************************************************************************** * * - * Function: match_glob * - * * * Purpose: see whether a file (e.g., "parameter.conf") * * matches a pattern (e.g., "p*.conf") * * * @@ -127,8 +125,6 @@ static int match_glob(const char *file, const char *pattern) /****************************************************************************** * * - * Function: parse_glob * - * * * Purpose: parse a glob like "/usr/local/etc/zabbix_agentd.conf.d/p*.conf" * * into "/usr/local/etc/zabbix_agentd.conf.d" and "p*.conf" parts * * * @@ -199,8 +195,6 @@ trim: /****************************************************************************** * * - * Function: parse_cfg_dir * - * * * Purpose: parse directory with configuration files * * * * Parameters: path - full path to directory * @@ -307,8 +301,6 @@ out: /****************************************************************************** * * - * Function: parse_cfg_object * - * * * Purpose: parse "Include=..." line in configuration file * * * * Parameters: cfg_file - full name of config file * @@ -358,8 +350,6 @@ clean: /****************************************************************************** * * - * Function: parse_cfg_file * - * * * Purpose: parse configuration file * * * * Parameters: cfg_file - full name of config file * @@ -638,8 +628,6 @@ static int addr_compare_func(const void *d1, const void *d2) /****************************************************************************** * * - * Function: zbx_set_data_destination_hosts * - * * * Purpose: parse "ServerActive' parameter value and set destination servers * * using a callback function * * * diff --git a/src/libs/zbxcrypto/base64.c b/src/libs/zbxcrypto/base64.c index aaea02504f0..9f3d2e22820 100644 --- a/src/libs/zbxcrypto/base64.c +++ b/src/libs/zbxcrypto/base64.c @@ -22,8 +22,6 @@ /****************************************************************************** * * - * Function: is_base64 * - * * * Purpose: is the character passed in a base64 character? * * * * Parameters: c - character to test * @@ -50,8 +48,6 @@ static int is_base64(char c) /****************************************************************************** * * - * Function: char_base64_encode * - * * * Purpose: encode a byte into a base64 character * * * * Parameters: uc - character to encode * @@ -68,8 +64,6 @@ static char char_base64_encode(unsigned char uc) /****************************************************************************** * * - * Function: char_base64_decode * - * * * Purpose: decode a base64 character into a byte * * * * Parameters: c - character to decode * @@ -104,8 +98,6 @@ static unsigned char char_base64_decode(char c) /****************************************************************************** * * - * Function: str_base64_encode * - * * * Purpose: encode a string into a base64 string * * * * Parameters: p_str - [IN] the string to encode * @@ -170,8 +162,6 @@ void str_base64_encode(const char *p_str, char *p_b64str, int in_size) /****************************************************************************** * * - * Function: str_base64_encode_dyn * - * * * Purpose: encode a string into a base64 string * * with dynamic memory allocation * * * @@ -217,8 +207,6 @@ void str_base64_encode_dyn(const char *p_str, char **p_b64str, int in_size) /****************************************************************************** * * - * Function: str_base64_decode * - * * * Purpose: decode a base64 string into a string * * * * Parameters: p_b64str - [IN] the base64 string to decode * diff --git a/src/libs/zbxcrypto/tls.c b/src/libs/zbxcrypto/tls.c index c7bcd3f4220..bc4c06ff3fc 100644 --- a/src/libs/zbxcrypto/tls.c +++ b/src/libs/zbxcrypto/tls.c @@ -214,8 +214,6 @@ ZBX_THREAD_LOCAL char info_buf[256]; #if defined(HAVE_GNUTLS) /****************************************************************************** * * - * Function: zbx_gnutls_debug_cb * - * * * Purpose: write a GnuTLS debug message into Zabbix log * * * * Comments: * @@ -234,8 +232,6 @@ static void zbx_gnutls_debug_cb(int level, const char *str) /****************************************************************************** * * - * Function: zbx_gnutls_audit_cb * - * * * Purpose: write a GnuTLS audit message into Zabbix log * * * * Comments: * @@ -259,8 +255,6 @@ static void zbx_gnutls_audit_cb(gnutls_session_t session, const char *str) #if defined(HAVE_OPENSSL) /****************************************************************************** * * - * Function: zbx_openssl_info_cb * - * * * Purpose: get state, alert, error information on TLS connection * * * * Comments: * @@ -313,8 +307,6 @@ static void zbx_openssl_info_cb(const SSL *ssl, int where, int ret) /****************************************************************************** * * - * Function: zbx_tls_error_msg * - * * * Purpose: compose a TLS error message * * * ******************************************************************************/ @@ -342,8 +334,6 @@ void zbx_tls_error_msg(char **error, size_t *error_alloc, size_t *error_offset) /****************************************************************************** * * - * Function: zbx_tls_parameter_name * - * * * Purpose: * * return the name of a configuration file or command line parameter that * * the value of the given parameter comes from * @@ -435,8 +425,6 @@ static const char *zbx_tls_parameter_name(int type, char **param) /****************************************************************************** * * - * Function: zbx_tls_parameter_not_empty * - * * * Purpose: * * Helper function: check if a configuration parameter is defined it must * * not be empty. Otherwise log error and exit. * @@ -493,8 +481,6 @@ static void zbx_tls_parameter_not_empty(char **param) /****************************************************************************** * * - * Function: zbx_tls_validation_error * - * * * Purpose: * * Helper function: log error message depending on program type and exit. * * * @@ -628,8 +614,6 @@ static void zbx_tls_validation_error(int type, char **param1, char **param2) /****************************************************************************** * * - * Function: zbx_tls_validation_error2 * - * * * Purpose: * * Helper function: log error message depending on program type and exit * * * @@ -680,8 +664,6 @@ static void zbx_tls_validation_error2(int type, char **param1, char **param2, ch /****************************************************************************** * * - * Function: zbx_tls_validate_config * - * * * Purpose: check for allowed combinations of TLS configuration parameters * * * * Comments: * @@ -988,8 +970,6 @@ static void zbx_psk_warn_misconfig(const char *psk_identity) #if defined(HAVE_GNUTLS) /****************************************************************************** * * - * Function: zbx_psk_cb * - * * * Purpose: * * find and set the requested pre-shared key upon GnuTLS request * * * @@ -1101,8 +1081,6 @@ static int zbx_psk_cb(gnutls_session_t session, const char *psk_identity, gnutls #elif defined(HAVE_OPENSSL) && defined(HAVE_OPENSSL_WITH_PSK) /****************************************************************************** * * - * Function: zbx_psk_client_cb * - * * * Purpose: * * set pre-shared key for outgoing TLS connection upon OpenSSL request * * * @@ -1157,8 +1135,6 @@ static unsigned int zbx_psk_client_cb(SSL *ssl, const char *hint, char *identity /****************************************************************************** * * - * Function: zbx_psk_server_cb * - * * * Purpose: * * set pre-shared key for incoming TLS connection upon OpenSSL request * * * @@ -1274,8 +1250,6 @@ fail: /****************************************************************************** * * - * Function: zbx_check_psk_identity_len * - * * * Purpose: Check PSK identity length. Exit if length exceeds the maximum. * * * ******************************************************************************/ @@ -1292,8 +1266,6 @@ static void zbx_check_psk_identity_len(size_t psk_identity_len) /****************************************************************************** * * - * Function: zbx_read_psk_file * - * * * Purpose: * * read a pre-shared key from a configured file and convert it from * * textual representation (ASCII hex digit string) to a binary * @@ -1379,8 +1351,6 @@ out: #if defined(HAVE_GNUTLS) /****************************************************************************** * * - * Function: zbx_log_ciphersuites * - * * * Purpose: write names of enabled GnuTLS ciphersuites into Zabbix log for * * debugging * * * @@ -1425,8 +1395,6 @@ static void zbx_log_ciphersuites(const char *title1, const char *title2, gnutls_ #elif defined(HAVE_OPENSSL) /****************************************************************************** * * - * Function: zbx_log_ciphersuites * - * * * Purpose: write names of enabled OpenSSL ciphersuites into Zabbix log for * * debugging * * * @@ -1465,8 +1433,6 @@ static void zbx_log_ciphersuites(const char *title1, const char *title2, SSL_CTX #if defined(HAVE_GNUTLS) /****************************************************************************** * * - * Function: zbx_print_rdn_value * - * * * Purpose: * * print an RDN (relative distinguished name) value into buffer * * * @@ -1591,8 +1557,6 @@ small_buf: #if defined(HAVE_GNUTLS) /****************************************************************************** * * - * Function: zbx_x509_dn_gets * - * * * Purpose: * * Print distinguished name (i.e. issuer, subject) into buffer. Intended * * to use as an alternative to GnuTLS gnutls_x509_crt_get_issuer_dn() and * @@ -1740,8 +1704,6 @@ small_buf: #elif defined(HAVE_OPENSSL) /****************************************************************************** * * - * Function: zbx_x509_dn_gets * - * * * Purpose: * * Print distinguished name (i.e. issuer, subject) into buffer. Intended * * to use as an alternative to OpenSSL X509_NAME_oneline() and to meet * @@ -1808,8 +1770,6 @@ out: #if defined(HAVE_GNUTLS) /****************************************************************************** * * - * Function: zbx_get_peer_cert * - * * * Purpose: get peer certificate from session * * * * Parameters: * @@ -1876,8 +1836,6 @@ static gnutls_x509_crt_t zbx_get_peer_cert(const gnutls_session_t session, char /****************************************************************************** * * - * Function: zbx_log_peer_cert * - * * * Purpose: write peer certificate information into Zabbix log for debugging * * * * Parameters: * @@ -1945,8 +1903,6 @@ static void zbx_log_peer_cert(const char *function_name, const zbx_tls_context_t #if defined(HAVE_GNUTLS) /****************************************************************************** * * - * Function: zbx_verify_peer_cert * - * * * Purpose: basic verification of peer certificate * * * * Return value: * @@ -1989,8 +1945,6 @@ static int zbx_verify_peer_cert(const gnutls_session_t session, char **error) /****************************************************************************** * * - * Function: zbx_verify_issuer_subject * - * * * Purpose: * * verify peer certificate issuer and subject of the given TLS context * * * @@ -2107,8 +2061,6 @@ static int zbx_verify_issuer_subject(const zbx_tls_context_t *tls_ctx, const cha /****************************************************************************** * * - * Function: zbx_check_server_issuer_subject * - * * * Purpose: * * check server certificate issuer and subject (for passive proxies and * * agent passive checks) * @@ -2152,8 +2104,6 @@ int zbx_check_server_issuer_subject(zbx_socket_t *sock, char **error) /****************************************************************************** * * - * Function: zbx_tls_library_init * - * * * Purpose: initialize TLS library, log library version * * * * Comments: * @@ -2194,8 +2144,6 @@ static void zbx_tls_library_init(void) /****************************************************************************** * * - * Function: zbx_tls_library_deinit * - * * * Purpose: deinitialize TLS library * * * ******************************************************************************/ @@ -2218,8 +2166,6 @@ void zbx_tls_library_deinit(void) /****************************************************************************** * * - * Function: zbx_tls_init_parent * - * * * Purpose: initialize TLS library in a parent process * * * ******************************************************************************/ @@ -2232,8 +2178,6 @@ void zbx_tls_init_parent(void) /****************************************************************************** * * - * Function: zbx_tls_init_child * - * * * Purpose: read available configuration parameters and initialize TLS * * library in a child process * * * @@ -3118,8 +3062,6 @@ out1: /****************************************************************************** * * - * Function: zbx_tls_free_on_signal * - * * * Purpose: TLS cleanup for using in signal handlers * * * ******************************************************************************/ @@ -3131,8 +3073,6 @@ void zbx_tls_free_on_signal(void) /****************************************************************************** * * - * Function: zbx_tls_free * - * * * Purpose: release TLS library resources allocated in zbx_tls_init_parent() * * and zbx_tls_init_child() * * * @@ -3205,8 +3145,6 @@ void zbx_tls_free(void) /****************************************************************************** * * - * Function: zbx_tls_connect * - * * * Purpose: establish a TLS connection over an established TCP connection * * * * Parameters: * @@ -3739,8 +3677,6 @@ out1: /****************************************************************************** * * - * Function: zbx_tls_accept * - * * * Purpose: establish a TLS connection over an accepted TCP connection * * * * Parameters: * @@ -4432,8 +4368,6 @@ ssize_t zbx_tls_read(zbx_socket_t *s, char *buf, size_t len, char **error) /****************************************************************************** * * - * Function: zbx_tls_close * - * * * Purpose: close a TLS connection before closing a TCP socket * * * ******************************************************************************/ @@ -4509,8 +4443,6 @@ void zbx_tls_close(zbx_socket_t *s) /****************************************************************************** * * - * Function: zbx_tls_get_attr_cert * - * * * Purpose: get certificate attributes from the context of established * * connection * * * @@ -4600,8 +4532,6 @@ int zbx_tls_get_attr_cert(const zbx_socket_t *s, zbx_tls_conn_attr_t *attr) /****************************************************************************** * * - * Function: zbx_tls_get_attr_psk * - * * * Purpose: get PSK attributes from the context of established connection * * * * Comments: * @@ -4640,8 +4570,6 @@ int zbx_tls_get_attr_psk(const zbx_socket_t *s, zbx_tls_conn_attr_t *attr) #if defined(_WINDOWS) /****************************************************************************** * * - * Function: zbx_tls_pass_vars * - * * * Purpose: pass some TLS variables from one thread to other * * * * Comments: used in Zabbix sender on MS Windows * @@ -4668,8 +4596,6 @@ void zbx_tls_pass_vars(ZBX_THREAD_SENDVAL_TLS_ARGS *args) /****************************************************************************** * * - * Function: zbx_tls_take_vars * - * * * Purpose: pass some TLS variables from one thread to other * * * * Comments: used in Zabbix sender on MS Windows * diff --git a/src/libs/zbxcrypto/tls_version.c b/src/libs/zbxcrypto/tls_version.c index d1c14f1ae49..83ea5df6f1b 100644 --- a/src/libs/zbxcrypto/tls_version.c +++ b/src/libs/zbxcrypto/tls_version.c @@ -35,8 +35,6 @@ /****************************************************************************** * * - * Function: zbx_tls_version * - * * * Purpose: print tls library version on stdout by application request with * * parameter '-V' * * * diff --git a/src/libs/zbxdb/db.c b/src/libs/zbxdb/db.c index 0123612da06..17ce79a3c3e 100644 --- a/src/libs/zbxdb/db.c +++ b/src/libs/zbxdb/db.c @@ -167,8 +167,6 @@ static void zbx_db_errlog(zbx_err_codes_t zbx_errno, int db_errno, const char *d /****************************************************************************** * * - * Function: zbx_db_last_strerr * - * * * Purpose: get last error set by database * * * * Return value: last database error message * @@ -181,8 +179,6 @@ const char *zbx_db_last_strerr(void) /****************************************************************************** * * - * Function: zbx_db_last_errcode * - * * * Purpose: get last error code returned by database * * * * Return value: last database error code * @@ -238,8 +234,6 @@ static const char *zbx_oci_error(sword status, sb4 *err) /****************************************************************************** * * - * Function: OCI_handle_sql_error * - * * * Purpose: handles Oracle prepare/bind/execute/select operation error * * * * Parameters: zerrcode - [IN] the Zabbix errorcode for the failed database * @@ -363,8 +357,6 @@ static int is_recoverable_postgresql_error(const PGconn *pg_conn, const PGresult /****************************************************************************** * * - * Function: zbx_db_init_autoincrement_options * - * * * Purpose: specify the autoincrement options during db connect * * * ******************************************************************************/ @@ -375,8 +367,6 @@ void zbx_db_init_autoincrement_options(void) /****************************************************************************** * * - * Function: zbx_db_connect * - * * * Purpose: connect to the database * * * * Return value: ZBX_DB_OK - successfully connected * @@ -1016,8 +1006,6 @@ void zbx_db_close(void) /****************************************************************************** * * - * Function: zbx_db_begin * - * * * Purpose: start transaction * * * * Comments: do nothing if DB does not support transactions * @@ -1050,8 +1038,6 @@ int zbx_db_begin(void) /****************************************************************************** * * - * Function: zbx_db_commit * - * * * Purpose: commit transaction * * * * Comments: do nothing if DB does not support transactions * @@ -1098,8 +1084,6 @@ int zbx_db_commit(void) /****************************************************************************** * * - * Function: zbx_db_rollback * - * * * Purpose: rollback transaction * * * * Comments: do nothing if DB does not support transactions * @@ -1215,8 +1199,6 @@ int zbx_db_statement_prepare(const char *sql) /****************************************************************************** * * - * Function: db_bind_dynamic_cb * - * * * Purpose: callback function used by dynamic parameter binding * * * ******************************************************************************/ @@ -1270,8 +1252,6 @@ static sb4 db_bind_dynamic_cb(dvoid *ctxp, OCIBind *bindp, ub4 iter, ub4 index, /****************************************************************************** * * - * Function: zbx_db_bind_parameter_dyn * - * * * Purpose: performs dynamic parameter binding, converting value if necessary * * * * Parameters: context - [OUT] the bind context * @@ -1425,8 +1405,6 @@ out: /****************************************************************************** * * - * Function: zbx_db_vexecute * - * * * Purpose: Execute SQL statement. For non-select statements only. * * * * Return value: ZBX_DB_FAIL (on error) or ZBX_DB_DOWN (on recoverable error) * @@ -1607,8 +1585,6 @@ clean: /****************************************************************************** * * - * Function: zbx_db_vselect * - * * * Purpose: execute a select statement * * * * Return value: data, NULL (on error) or (DB_RESULT)ZBX_DB_DOWN * @@ -1913,8 +1889,6 @@ DB_RESULT zbx_db_select_n(const char *query, int n) #ifdef HAVE_POSTGRESQL /****************************************************************************** * * - * Function: zbx_db_bytea_unescape * - * * * Purpose: converts the null terminated string into binary buffer * * * * Transformations: * @@ -2247,8 +2221,6 @@ static int zbx_db_is_escape_sequence(char c) /****************************************************************************** * * - * Function: zbx_db_escape_string * - * * * Return value: escaped string * * * * Comments: sync changes with 'zbx_db_get_escape_string_len' * @@ -2288,8 +2260,6 @@ static void zbx_db_escape_string(const char *src, char *dst, size_t len, zbx_esc /****************************************************************************** * * - * Function: zbx_db_get_escape_string_len * - * * * Purpose: to calculate escaped string length limited by bytes or characters * * whichever is reached first. * * * @@ -2335,8 +2305,6 @@ static size_t zbx_db_get_escape_string_len(const char *s, size_t max_bytes, size /****************************************************************************** * * - * Function: zbx_db_dyn_escape_string * - * * * Purpose: to escape string limited by bytes or characters, whichever limit * * is reached first. * * * @@ -2364,8 +2332,6 @@ char *zbx_db_dyn_escape_string(const char *src, size_t max_bytes, size_t max_cha /****************************************************************************** * * - * Function: zbx_db_get_escape_like_pattern_len * - * * * Return value: return length of escaped LIKE pattern with terminating '\0' * * * * Comments: sync changes with 'zbx_db_escape_like_pattern' * @@ -2391,8 +2357,6 @@ static int zbx_db_get_escape_like_pattern_len(const char *src) /****************************************************************************** * * - * Function: zbx_db_escape_like_pattern * - * * * Return value: escaped string to be used as pattern in LIKE * * * * Comments: sync changes with 'zbx_db_get_escape_like_pattern_len' * @@ -2448,8 +2412,6 @@ static void zbx_db_escape_like_pattern(const char *src, char *dst, int len) /****************************************************************************** * * - * Function: zbx_db_dyn_escape_like_pattern * - * * * Return value: escaped string to be used as pattern in LIKE * * * ******************************************************************************/ @@ -2469,8 +2431,6 @@ char *zbx_db_dyn_escape_like_pattern(const char *src) /****************************************************************************** * * - * Function: zbx_db_strlen_n * - * * * Purpose: return the string length to fit into a database field of the * * specified size * * * @@ -2484,8 +2444,6 @@ int zbx_db_strlen_n(const char *text_loc, size_t maxlen) /********************************************************************************* * * - * Function: zbx_db_version_check * - * * * Purpose: determine if a vendor database(MySQL, MariaDB, PostgreSQL, * * Oracle, ElasticDB) version satisfies Zabbix requirements * * * @@ -2533,8 +2491,6 @@ int zbx_db_version_check(const char *database, zbx_uint32_t current_version, zbx /****************************************************************************** * * - * Function: zbx_db_version_json_create * - * * * Purpose: prepare json for front-end with the DB current, minimum and * * maximum versions and a flag that indicates if the version * * satisfies the requirements * @@ -2567,8 +2523,6 @@ void zbx_db_version_json_create(struct zbx_json *json, struct zbx_db_version_inf /****************************************************************************** * * - * Function: zbx_dbms_version_get * - * * * Purpose: For PostgreSQL, MySQL and MariaDB: * * returns DBMS version as integer: MMmmuu * * M = major version part * @@ -2607,8 +2561,6 @@ zbx_uint32_t zbx_dbms_version_get(void) #ifdef HAVE_MYSQL /****************************************************************************** * * - * Function: zbx_dbms_mariadb_used * - * * * Purpose: returns flag if the mariadb was detected * * * * Return value: ON - mariadb detected * @@ -2622,8 +2574,6 @@ int zbx_dbms_mariadb_used(void) /*************************************************************************************************************** * * - * Function: zbx_dbms_version_info_extract * - * * * Purpose: retrieves the DB version info, including numeric version value * * * * For PostgreSQL: * @@ -2840,8 +2790,6 @@ out: #if defined(HAVE_POSTGRESQL) /****************************************************************************** * * - * Function: zbx_tsdb_get_version * - * * * Purpose: returns TimescaleDB (TSDB) version as integer: MMmmuu * * M = major version part * * m = minor version part * diff --git a/src/libs/zbxdbcache/dbcache.c b/src/libs/zbxdbcache/dbcache.c index ea57addf803..25bccccdebc 100644 --- a/src/libs/zbxdbcache/dbcache.c +++ b/src/libs/zbxdbcache/dbcache.c @@ -197,8 +197,6 @@ ZBX_PTR_VECTOR_IMPL(tags, zbx_tag_t*) /****************************************************************************** * * - * Function: DCget_stats_all * - * * * Purpose: retrieves all internal metrics of the database cache * * * * Parameters: stats - [OUT] write cache metrics * @@ -225,8 +223,6 @@ void DCget_stats_all(zbx_wcache_info_t *wcache_info) /****************************************************************************** * * - * Function: DCget_stats * - * * * Purpose: get statistics of the database cache * * * * Author: Alexander Vladishev * @@ -343,8 +339,6 @@ void *DCget_stats(int request) /****************************************************************************** * * - * Function: DCget_trend * - * * * Purpose: find existing or add new structure and return pointer * * * * Return value: pointer to a trend structure * @@ -367,8 +361,6 @@ static ZBX_DC_TREND *DCget_trend(zbx_uint64_t itemid) /****************************************************************************** * * - * Function: DCupdate_trends * - * * * Purpose: apply disable_from changes to cache * * * ******************************************************************************/ @@ -395,8 +387,6 @@ static void DCupdate_trends(zbx_vector_uint64_pair_t *trends_diff) /****************************************************************************** * * - * Function: dc_insert_trends_in_db * - * * * Purpose: helper function for DCflush trends * * * ******************************************************************************/ @@ -445,8 +435,6 @@ static void dc_insert_trends_in_db(ZBX_DC_TREND *trends, int trends_num, unsigne /****************************************************************************** * * - * Function: dc_remove_updated_trends * - * * * Purpose: Update trends disable_until for items without trends data past or * * equal the specified clock * * * @@ -518,8 +506,6 @@ static void dc_remove_updated_trends(ZBX_DC_TREND *trends, int trends_num, const /****************************************************************************** * * - * Function: dc_trends_update_float * - * * * Purpose: helper function for DCflush trends * * * ******************************************************************************/ @@ -551,8 +537,6 @@ static void dc_trends_update_float(ZBX_DC_TREND *trend, DB_ROW row, int num, siz /****************************************************************************** * * - * Function: dc_trends_update_uint * - * * * Purpose: helper function for DCflush trends * * * ******************************************************************************/ @@ -591,8 +575,6 @@ static void dc_trends_update_uint(ZBX_DC_TREND *trend, DB_ROW row, int num, size /****************************************************************************** * * - * Function: dc_trends_fetch_and_update * - * * * Purpose: helper function for DCflush trends * * * ******************************************************************************/ @@ -669,8 +651,6 @@ static void dc_trends_fetch_and_update(ZBX_DC_TREND *trends, int trends_num, zbx /****************************************************************************** * * - * Function: DBflush_trends * - * * * Purpose: flush trend to the database * * * * Author: Alexander Vladishev * @@ -793,8 +773,6 @@ static void DBflush_trends(ZBX_DC_TREND *trends, int *trends_num, zbx_vector_uin /****************************************************************************** * * - * Function: DCflush_trend * - * * * Purpose: move trend to the array of trends for flushing to DB * * * * Author: Alexander Vladishev * @@ -820,8 +798,6 @@ static void DCflush_trend(ZBX_DC_TREND *trend, ZBX_DC_TREND **trends, int *trend /****************************************************************************** * * - * Function: DCadd_trend * - * * * Purpose: add new value to the trends * * * * Author: Alexander Vladishev * @@ -868,8 +844,6 @@ static void DCadd_trend(const ZBX_DC_HISTORY *history, ZBX_DC_TREND **trends, in /****************************************************************************** * * - * Function: DCmass_update_trends * - * * * Purpose: update trends cache and get list of trends to flush into database * * * * Parameters: history - [IN] array of history data * @@ -955,8 +929,6 @@ static int zbx_trend_compare(const void *d1, const void *d2) /****************************************************************************** * * - * Function: DBmass_update_trends * - * * * Purpose: prepare history data using items from configuration cache * * * * Parameters: trends - [IN] trends from cache to be added to database * @@ -991,8 +963,6 @@ zbx_host_info_t; /****************************************************************************** * * - * Function: zbx_host_info_clean * - * * * Purpose: frees resources allocated to store host groups names * * * * Parameters: host_info - [IN] host information * @@ -1006,8 +976,6 @@ static void zbx_host_info_clean(zbx_host_info_t *host_info) /****************************************************************************** * * - * Function: db_get_hosts_info_by_hostid * - * * * Purpose: get hosts groups names * * * * Parameters: hosts_info - [IN/OUT] output names of host groups for a host * @@ -1068,8 +1036,6 @@ zbx_item_info_t; /****************************************************************************** * * - * Function: db_get_items_info_by_itemid * - * * * Purpose: get items name and item tags * * * * Parameters: items_info - [IN/OUT] output item name and item tags * @@ -1135,8 +1101,6 @@ static void db_get_items_info_by_itemid(zbx_hashset_t *items_info, const zbx_vec /****************************************************************************** * * - * Function: item_tag_free * - * * * Purpose: frees resources allocated to store item tag * * * * Parameters: item_tag - [IN] item tag * @@ -1150,8 +1114,6 @@ static void item_tag_free(zbx_tag_t item_tag) /****************************************************************************** * * - * Function: zbx_item_info_clean * - * * * Purpose: frees resources allocated to store item tags and name * * * * Parameters: item_info - [IN] item information * @@ -1166,8 +1128,6 @@ static void zbx_item_info_clean(zbx_item_info_t *item_info) /****************************************************************************** * * - * Function: DCexport_trends * - * * * Purpose: export trends * * * * Parameters: trends - [IN] trends from cache * @@ -1266,8 +1226,6 @@ static void DCexport_trends(const ZBX_DC_TREND *trends, int trends_num, zbx_hash /****************************************************************************** * * - * Function: DCexport_history * - * * * Purpose: export history * * * * Parameters: history - [IN/OUT] array of history data * @@ -1381,8 +1339,6 @@ static void DCexport_history(const ZBX_DC_HISTORY *history, int history_num, zbx /****************************************************************************** * * - * Function: DCexport_history_and_trends * - * * * Purpose: export history and trends * * * * Parameters: history - [IN/OUT] array of history data * @@ -1502,8 +1458,6 @@ clean: /****************************************************************************** * * - * Function: DCexport_all_trends * - * * * Purpose: export all trends * * * * Parameters: trends - [IN] trends from cache * @@ -1551,8 +1505,6 @@ static void DCexport_all_trends(const ZBX_DC_TREND *trends, int trends_num) /****************************************************************************** * * - * Function: DCsync_trends * - * * * Purpose: flush all trends to the database * * * * Author: Alexander Vladishev * @@ -1604,8 +1556,6 @@ static void DCsync_trends(void) /****************************************************************************** * * - * Function: recalculate_triggers * - * * * Purpose: re-calculate and update values of triggers related to the items * * * * Parameters: history - [IN] array of history data * @@ -1780,8 +1730,6 @@ static void DCinventory_value_free(zbx_inventory_value_t *inventory_value) /****************************************************************************** * * - * Function: dc_history_clean_value * - * * * Purpose: frees resources allocated to store str/text/log value * * * * Parameters: history - [IN] the history data * @@ -1815,8 +1763,6 @@ static void dc_history_clean_value(ZBX_DC_HISTORY *history) /****************************************************************************** * * - * Function: hc_free_item_values * - * * * Purpose: frees resources allocated to store str/text/log values * * * * Parameters: history - [IN] the history data * @@ -1833,8 +1779,6 @@ static void hc_free_item_values(ZBX_DC_HISTORY *history, int history_num) /****************************************************************************** * * - * Function: dc_history_set_error * - * * * Purpose: sets history data to notsupported * * * * Parameters: history - [IN] the history data * @@ -1854,8 +1798,6 @@ static void dc_history_set_error(ZBX_DC_HISTORY *hdata, char *errmsg) /****************************************************************************** * * - * Function: dc_history_set_value * - * * * Purpose: sets history data value * * * * Parameters: hdata - [IN/OUT] the history data * @@ -1910,8 +1852,6 @@ static void dc_history_set_value(ZBX_DC_HISTORY *hdata, unsigned char value_type /****************************************************************************** * * - * Function: normalize_item_value * - * * * Purpose: normalize item value by performing truncation of long text * * values and changes value format according to the item value type * * * @@ -1987,8 +1927,6 @@ static void normalize_item_value(const DC_ITEM *item, ZBX_DC_HISTORY *hdata) /****************************************************************************** * * - * Function: calculate_item_update * - * * * Purpose: calculates what item fields must be updated * * * * Parameters: item - [IN] the item * @@ -2080,8 +2018,6 @@ static zbx_item_diff_t *calculate_item_update(DC_ITEM *item, const ZBX_DC_HISTOR /****************************************************************************** * * - * Function: DBmass_update_items * - * * * Purpose: update item data and inventory in database * * * * Parameters: item_diff - item changes * @@ -2130,8 +2066,6 @@ static void DBmass_update_items(const zbx_vector_ptr_t *item_diff, const zbx_vec /****************************************************************************** * * - * Function: DCmass_proxy_prepare_itemdiff * - * * * Purpose: prepare itemdiff after receiving new values * * * * Parameters: history - array of history data * @@ -2170,8 +2104,6 @@ static void DCmass_proxy_prepare_itemdiff(ZBX_DC_HISTORY *history, int history_n /****************************************************************************** * * - * Function: DCmass_proxy_update_items * - * * * Purpose: update items info after new value is received * * * * Parameters: item_diff - diff of items to be updated * @@ -2363,8 +2295,6 @@ static int add_history(ZBX_DC_HISTORY *history, int history_num, zbx_vector_ptr_ /****************************************************************************** * * - * Function: DBmass_add_history * - * * * Purpose: inserting new history data after new value is received * * * * Parameters: history - array of history data * @@ -2401,8 +2331,6 @@ static int DBmass_add_history(ZBX_DC_HISTORY *history, int history_num) /****************************************************************************** * * - * Function: dc_add_proxy_history * - * * * Purpose: helper function for DCmass_proxy_add_history() * * * * Comment: this function is meant for items with value_type other other than * @@ -2470,8 +2398,6 @@ static void dc_add_proxy_history(ZBX_DC_HISTORY *history, int history_num) /****************************************************************************** * * - * Function: dc_add_proxy_history_meta * - * * * Purpose: helper function for DCmass_proxy_add_history() * * * * Comment: this function is meant for items with value_type other other than * @@ -2540,8 +2466,6 @@ static void dc_add_proxy_history_meta(ZBX_DC_HISTORY *history, int history_num) /****************************************************************************** * * - * Function: dc_add_proxy_history_log * - * * * Purpose: helper function for DCmass_proxy_add_history() * * * * Comment: this function is meant for items with value_type * @@ -2611,8 +2535,6 @@ static void dc_add_proxy_history_log(ZBX_DC_HISTORY *history, int history_num) /****************************************************************************** * * - * Function: dc_add_proxy_history_notsupported * - * * * Purpose: helper function for DCmass_proxy_add_history() * * * ******************************************************************************/ @@ -2642,8 +2564,6 @@ static void dc_add_proxy_history_notsupported(ZBX_DC_HISTORY *history, int histo /****************************************************************************** * * - * Function: DCmass_proxy_add_history * - * * * Purpose: inserting new history data after new value is received * * * * Parameters: history - array of history data * @@ -2707,8 +2627,6 @@ static void DBmass_proxy_add_history(ZBX_DC_HISTORY *history, int history_num) /****************************************************************************** * * - * Function: DCmass_prepare_history * - * * * Purpose: prepare history data using items from configuration cache and * * generate item changes to be applied and host inventory values to * * be added * @@ -2832,8 +2750,6 @@ static void DCmass_prepare_history(ZBX_DC_HISTORY *history, const zbx_vector_uin /****************************************************************************** * * - * Function: DCmodule_prepare_history * - * * * Purpose: prepare history data to share them with loadable modules, sort * * data by type skipping low-level discovery data, meta information * * updates and notsupported items * @@ -3019,8 +2935,6 @@ static void DCmodule_sync_history(int history_float_num, int history_integer_num /****************************************************************************** * * - * Function: proxy_prepare_history * - * * * Purpose: prepares history update by checking which values must be stored * * * * Parameters: history - [IN/OUT] the history values * @@ -3164,8 +3078,6 @@ static void sync_proxy_history(int *total_num, int *more) /****************************************************************************** * * - * Function: sync_server_history * - * * * Purpose: flush history cache to database, process triggers of flushed * * and timer triggers from timer queue * * * @@ -3501,8 +3413,6 @@ static void sync_server_history(int *values_num, int *triggers_num, int *more) /****************************************************************************** * * - * Function: sync_history_cache_full * - * * * Purpose: writes updates and new data from history cache to database * * * * Comments: This function is used to flush history cache at server/proxy * @@ -3579,8 +3489,6 @@ static void sync_history_cache_full(void) /****************************************************************************** * * - * Function: zbx_log_sync_history_cache_progress * - * * * Purpose: log progress of syncing history data * * * ******************************************************************************/ @@ -3630,8 +3538,6 @@ void zbx_log_sync_history_cache_progress(void) /****************************************************************************** * * - * Function: zbx_sync_history_cache * - * * * Purpose: writes updates and new data from history cache to database * * * * Parameters: values_num - [OUT] the number of synced values * @@ -3887,8 +3793,6 @@ static void dc_local_add_history_empty(zbx_uint64_t itemid, unsigned char item_v /****************************************************************************** * * - * Function: dc_add_history * - * * * Purpose: add new value to the cache * * * * Parameters: itemid - [IN] the itemid * @@ -4030,8 +3934,6 @@ ZBX_MEM_FUNC_IMPL(__hc, hc_mem) /****************************************************************************** * * - * Function: hc_queue_elem_compare_func * - * * * Purpose: compares history queue elements * * * ******************************************************************************/ @@ -4049,8 +3951,6 @@ static int hc_queue_elem_compare_func(const void *d1, const void *d2) /****************************************************************************** * * - * Function: hc_free_data * - * * * Purpose: free history item data allocated in history cache * * * * Parameters: data - [IN] history item data * @@ -4089,8 +3989,6 @@ static void hc_free_data(zbx_hc_data_t *data) /****************************************************************************** * * - * Function: hc_queue_item * - * * * Purpose: put back item into history queue * * * * Parameters: data - [IN] history item data * @@ -4105,8 +4003,6 @@ static void hc_queue_item(zbx_hc_item_t *item) /****************************************************************************** * * - * Function: hc_get_item * - * * * Purpose: returns history item by itemid * * * * Parameters: itemid - [IN] the item id * @@ -4122,8 +4018,6 @@ static zbx_hc_item_t *hc_get_item(zbx_uint64_t itemid) /****************************************************************************** * * - * Function: hc_add_item * - * * * Purpose: adds a new item to history cache * * * * Parameters: itemid - [IN] the item id * @@ -4141,8 +4035,6 @@ static zbx_hc_item_t *hc_add_item(zbx_uint64_t itemid, zbx_hc_data_t *data) /****************************************************************************** * * - * Function: hc_mem_value_str_dup * - * * * Purpose: copies string value to history cache * * * * Parameters: str - [IN] the string value * @@ -4165,8 +4057,6 @@ static char *hc_mem_value_str_dup(const dc_value_str_t *str) /****************************************************************************** * * - * Function: hc_clone_history_str_data * - * * * Purpose: clones string value into history data memory * * * * Parameters: dst - [IN/OUT] a reference to the cloned value * @@ -4197,8 +4087,6 @@ static int hc_clone_history_str_data(char **dst, const dc_value_str_t *str) /****************************************************************************** * * - * Function: hc_clone_history_log_data * - * * * Purpose: clones log value into history data memory * * * * Parameters: dst - [IN/OUT] a reference to the cloned value * @@ -4237,8 +4125,6 @@ static int hc_clone_history_log_data(zbx_log_value_t **dst, const dc_item_value_ /****************************************************************************** * * - * Function: hc_clone_history_data * - * * * Purpose: clones item value from local cache into history cache * * * * Parameters: data - [IN/OUT] a reference to the cloned value * @@ -4354,8 +4240,6 @@ static int hc_clone_history_data(zbx_hc_data_t **data, const dc_item_value_t *it /****************************************************************************** * * - * Function: hc_add_item_values * - * * * Purpose: adds item values to the history cache * * * * Parameters: values - [IN] the item values to add * @@ -4427,8 +4311,6 @@ static void hc_add_item_values(dc_item_value_t *values, int values_num) /****************************************************************************** * * - * Function: hc_copy_history_data * - * * * Purpose: copies item value from history cache into the specified history * * value * * * @@ -4491,8 +4373,6 @@ static void hc_copy_history_data(ZBX_DC_HISTORY *history, zbx_uint64_t itemid, z /****************************************************************************** * * - * Function: hc_pop_items * - * * * Purpose: pops the next batch of history items from cache for processing * * * * Parameters: history_items - [OUT] the locked history items * @@ -4518,8 +4398,6 @@ static void hc_pop_items(zbx_vector_ptr_t *history_items) /****************************************************************************** * * - * Function: hc_get_item_values * - * * * Purpose: gets item history values * * * * Parameters: history - [OUT] the history valeus * @@ -4546,8 +4424,6 @@ static void hc_get_item_values(ZBX_DC_HISTORY *history, zbx_vector_ptr_t *histor /****************************************************************************** * * - * Function: hc_push_processed_items * - * * * Purpose: push back the processed history items into history cache * * * * Parameters: history_items - [IN] the history items containing processed * @@ -4591,8 +4467,6 @@ void hc_push_items(zbx_vector_ptr_t *history_items) /****************************************************************************** * * - * Function: hc_queue_get_size * - * * * Purpose: retrieve the size of history queue * * * ******************************************************************************/ @@ -4624,8 +4498,6 @@ int hc_get_history_compression_age(void) /****************************************************************************** * * - * Function: init_trend_cache * - * * * Purpose: Allocate shared memory for trend cache (part of database cache) * * * * Author: Vladimir Levijev * @@ -4675,8 +4547,6 @@ out: /****************************************************************************** * * - * Function: init_database_cache * - * * * Purpose: Allocate shared memory for database cache * * * * Author: Alexei Vladishev, Alexander Vladishev * @@ -4754,8 +4624,6 @@ out: /****************************************************************************** * * - * Function: DCsync_all * - * * * Purpose: writes updates and new data from pool and cache data to database * * * * Author: Alexei Vladishev * @@ -4774,8 +4642,6 @@ static void DCsync_all(void) /****************************************************************************** * * - * Function: free_database_cache * - * * * Purpose: Free memory allocated for database cache * * * * Author: Alexei Vladishev, Alexander Vladishev * @@ -4810,8 +4676,6 @@ void free_database_cache(int sync) /****************************************************************************** * * - * Function: DCget_nextid * - * * * Purpose: Return next id for requested table * * * * Author: Alexander Vladishev * @@ -4890,8 +4754,6 @@ zbx_uint64_t DCget_nextid(const char *table_name, int num) /****************************************************************************** * * - * Function: DCupdate_interfaces_availability * - * * * Purpose: performs interface availability reset for hosts with * * availability set on interfaces without enabled items * * * @@ -4917,8 +4779,6 @@ out: /****************************************************************************** * * - * Function: zbx_hc_get_diag_stats * - * * * Purpose: get history cache diagnostics statistics * * * ******************************************************************************/ @@ -4934,8 +4794,6 @@ void zbx_hc_get_diag_stats(zbx_uint64_t *items_num, zbx_uint64_t *values_num) /****************************************************************************** * * - * Function: zbx_hc_get_mem_stats * - * * * Purpose: get shared memory allocator statistics * * * ******************************************************************************/ @@ -4954,8 +4812,6 @@ void zbx_hc_get_mem_stats(zbx_mem_stats_t *data, zbx_mem_stats_t *index) /****************************************************************************** * * - * Function: zbx_hc_get_items * - * * * Purpose: get statistics of cached items * * * ******************************************************************************/ @@ -4980,8 +4836,6 @@ void zbx_hc_get_items(zbx_vector_uint64_pair_t *items) /****************************************************************************** * * - * Function: zbx_db_trigger_queue_locked * - * * * Purpose: checks if database trigger queue table is locked * * * ******************************************************************************/ @@ -4992,8 +4846,6 @@ int zbx_db_trigger_queue_locked(void) /****************************************************************************** * * - * Function: zbx_db_trigger_queue_unlock * - * * * Purpose: unlocks database trigger queue table * * * ******************************************************************************/ @@ -5004,8 +4856,6 @@ void zbx_db_trigger_queue_unlock(void) /****************************************************************************** * * - * Function: zbx_hc_proxyqueue_peek * - * * * Purpose: return first proxy in a queue, function assumes that a queue is * * not empty * * * @@ -5026,8 +4876,6 @@ static zbx_uint64_t zbx_hc_proxyqueue_peek(void) /****************************************************************************** * * - * Function: zbx_hc_proxyqueue_enqueue * - * * * Purpose: add new proxyid to a queue * * * * Parameters: proxyid - [IN] the proxy id * @@ -5046,8 +4894,6 @@ static void zbx_hc_proxyqueue_enqueue(zbx_uint64_t proxyid) /****************************************************************************** * * - * Function: zbx_hc_proxyqueue_dequeue * - * * * Purpose: try to dequeue proxyid from a proxy queue * * * * Parameters: chk_proxyid - [IN] the proxyid * @@ -5076,8 +4922,6 @@ static int zbx_hc_proxyqueue_dequeue(zbx_uint64_t proxyid) /****************************************************************************** * * - * Function: zbx_hc_proxyqueue_clear * - * * * Purpose: remove all proxies from proxy priority queue * * * ******************************************************************************/ @@ -5089,8 +4933,6 @@ static void zbx_hc_proxyqueue_clear(void) /****************************************************************************** * * - * Function: zbx_hc_check_proxy * - * * * Purpose: check status of a history cache usage, enqueue/dequeue proxy * * from priority list and accordingly enable or disable wait mode * * * diff --git a/src/libs/zbxdbcache/dbconfig.c b/src/libs/zbxdbcache/dbconfig.c index cbd0a907f06..4839fbe7bcf 100644 --- a/src/libs/zbxdbcache/dbconfig.c +++ b/src/libs/zbxdbcache/dbconfig.c @@ -78,8 +78,6 @@ int sync_in_progress = 0; /****************************************************************************** * * - * Function: zbx_value_validator_func_t * - * * * Purpose: validate macro value when expanding user macros * * * * Parameters: macro - [IN] the user macro * @@ -109,8 +107,6 @@ extern char *CONFIG_VAULTDBPATH; extern char *CONFIG_VAULTTOKEN; /****************************************************************************** * * - * Function: dc_strdup * - * * * Purpose: copies string into configuration cache shared memory * * * ******************************************************************************/ @@ -127,8 +123,6 @@ static char *dc_strdup(const char *source) /****************************************************************************** * * - * Function: is_item_processed_by_server * - * * * Parameters: type - [IN] item type [ITEM_TYPE_* flag] * * key - [IN] item key * * * @@ -250,8 +244,6 @@ static unsigned char poller_by_item(unsigned char type, const char *key) /****************************************************************************** * * - * Function: zbx_is_counted_in_item_queue * - * * * Purpose: determine whether the given item type is counted in item queue * * * * Return value: SUCCEED if item is counted in the queue, FAIL otherwise * @@ -282,8 +274,6 @@ int zbx_is_counted_in_item_queue(unsigned char type, const char *key) /****************************************************************************** * * - * Function: get_item_nextcheck_seed * - * * * Purpose: get the seed value to be used for item nextcheck calculations * * * * Return value: the seed for nextcheck calculations * @@ -438,8 +428,6 @@ static void DCincrease_disable_until(ZBX_DC_INTERFACE *interface, int now) /****************************************************************************** * * - * Function: DCfind_id * - * * * Purpose: Find an element in a hashset by its 'id' or create the element if * * it does not exist * * * @@ -500,8 +488,6 @@ static ZBX_DC_HOST *DCfind_host(const char *host) /****************************************************************************** * * - * Function: DCfind_proxy * - * * * Purpose: Find a record with proxy details in configuration cache using the * * proxy name * * * @@ -648,8 +634,6 @@ static void DCupdate_proxy_queue(ZBX_DC_PROXY *proxy) /****************************************************************************** * * - * Function: config_gmacro_add_index * - * * * Purpose: adds global macro index * * * * Parameters: gmacro_index - [IN/OUT] a global macro index hashset * @@ -679,8 +663,6 @@ static ZBX_DC_GMACRO_M *config_gmacro_add_index(zbx_hashset_t *gmacro_index, ZBX /****************************************************************************** * * - * Function: config_gmacro_remove_index * - * * * Purpose: removes global macro index * * * * Parameters: gmacro_index - [IN/OUT] a global macro index hashset * @@ -704,8 +686,6 @@ static ZBX_DC_GMACRO_M *config_gmacro_remove_index(zbx_hashset_t *gmacro_index, /****************************************************************************** * * - * Function: config_gmacro_context_compare * - * * * Purpose: comparison function to sort global macro vector by context * * operator, value and macro name * * * @@ -730,8 +710,6 @@ static int config_gmacro_context_compare(const void *d1, const void *d2) /****************************************************************************** * * - * Function: config_hmacro_add_index * - * * * Purpose: adds host macro index * * * * Parameters: hmacro_index - [IN/OUT] a host macro index hashset * @@ -760,8 +738,6 @@ static ZBX_DC_HMACRO_HM *config_hmacro_add_index(zbx_hashset_t *hmacro_index, ZB /****************************************************************************** * * - * Function: config_hmacro_remove_index * - * * * Purpose: removes host macro index * * * * Parameters: hmacro_index - [IN/OUT] a host macro index hashset * @@ -786,8 +762,6 @@ static ZBX_DC_HMACRO_HM *config_hmacro_remove_index(zbx_hashset_t *hmacro_index, /****************************************************************************** * * - * Function: config_hmacro_context_compare * - * * * Purpose: comparison function to sort host macro vector by context * * operator, value and macro name * * * @@ -906,8 +880,6 @@ clean: /****************************************************************************** * * - * Function: set_hk_opt * - * * * Purpose: sets and validates global housekeeping option * * * * Parameters: value - [OUT] housekeeping setting * @@ -2230,8 +2202,6 @@ void DCsync_kvs_paths(const struct zbx_json_parse *jp_kvs_paths) /****************************************************************************** * * - * Function: substitute_host_interface_macros * - * * * Purpose: trying to resolve the macros in host interface * * * ******************************************************************************/ @@ -2272,8 +2242,6 @@ static void substitute_host_interface_macros(ZBX_DC_INTERFACE *interface) /****************************************************************************** * * - * Function: dc_interface_snmpaddrs_remove * - * * * Purpose: remove interface from SNMP address -> interfaceid index * * * * Parameters: interface - [IN] the interface * @@ -2310,8 +2278,6 @@ static void dc_interface_snmpaddrs_remove(ZBX_DC_INTERFACE *interface) /****************************************************************************** * * - * Function: dc_interface_snmp_set * - * * * Purpose: setup SNMP attributes for interface with interfaceid index * * * * Parameters: interface - [IN] the interface * @@ -2356,8 +2322,6 @@ static ZBX_DC_SNMPINTERFACE *dc_interface_snmp_set(zbx_uint64_t interfaceid, con /****************************************************************************** * * - * Function: dc_interface_snmp_remove * - * * * Purpose: remove interface from SNMP address -> interfaceid index * * * * Parameters: interface - [IN] the interface * @@ -2628,8 +2592,6 @@ static void DCsync_interfaces(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dc_interface_snmpitems_remove * - * * * Purpose: remove item from interfaceid -> itemid index * * * * Parameters: interface - [IN] the item * @@ -2661,8 +2623,6 @@ static void dc_interface_snmpitems_remove(ZBX_DC_ITEM *item) /****************************************************************************** * * - * Function: dc_masteritem_remove_depitem * - * * * Purpose: remove itemid from master item dependent itemid vector * * * * Parameters: master_itemid - [IN] the master item identifier * @@ -2696,8 +2656,6 @@ static void dc_masteritem_remove_depitem(zbx_uint64_t master_itemid, zbx_uint64_ /****************************************************************************** * * - * Function: dc_interface_update_agent_stats * - * * * Purpose: update number of items per agent statistics * * * * Parameters: interface - [IN/OUT] the interface * @@ -3787,8 +3745,6 @@ static void DCconfig_sort_triggers_topologically(void); /****************************************************************************** * * - * Function: dc_trigger_deplist_release * - * * * Purpose: releases trigger dependency list, removing it if necessary * * * ******************************************************************************/ @@ -3806,8 +3762,6 @@ static int dc_trigger_deplist_release(ZBX_DC_TRIGGER_DEPLIST *trigdep) /****************************************************************************** * * - * Function: dc_trigger_deplist_init * - * * * Purpose: initializes trigger dependency list * * * ******************************************************************************/ @@ -3821,8 +3775,6 @@ static void dc_trigger_deplist_init(ZBX_DC_TRIGGER_DEPLIST *trigdep, ZBX_DC_TRIG /****************************************************************************** * * - * Function: dc_trigger_deplist_reset * - * * * Purpose: resets trigger dependency list to release memory allocated by * * dependencies vector * * * @@ -4017,8 +3969,6 @@ static int dc_function_calculate_nextcheck(const zbx_trigger_timer_t *timer, tim /****************************************************************************** * * - * Function: dc_trigger_function_timer_create * - * * * Purpose: create trigger timer based on the trend function * * * * Return value: Created timer or NULL in the case of error. * @@ -4070,8 +4020,6 @@ static zbx_trigger_timer_t *dc_trigger_function_timer_create(ZBX_DC_FUNCTION *fu /****************************************************************************** * * - * Function: dc_trigger_timer_create * - * * * Purpose: create trigger timer based on the specified trigger * * * * Return value: Created timer or NULL in the case of error. * @@ -4097,8 +4045,6 @@ static zbx_trigger_timer_t *dc_trigger_timer_create(ZBX_DC_TRIGGER *trigger) /****************************************************************************** * * - * Function: dc_trigger_timer_free * - * * * Purpose: free trigger timer * * * ******************************************************************************/ @@ -4112,8 +4058,6 @@ static void dc_trigger_timer_free(zbx_trigger_timer_t *timer) /****************************************************************************** * * - * Function: dc_schedule_trigger_timer * - * * * Purpose: schedule trigger timer to be executed at the specified time * * * * Parameter: timer - [IN] the timer to schedule * @@ -4141,8 +4085,6 @@ static void dc_schedule_trigger_timer(zbx_trigger_timer_t *timer, const zbx_time /****************************************************************************** * * - * Function: dc_schedule_new_trigger_timers * - * * * Purpose: set timer schedule and evaluation times based on functions and * * old trend function queue * * * @@ -4320,8 +4262,6 @@ static void DCsync_functions(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dc_regexp_remove_expression * - * * * Purpose: removes expression from regexp * * * ******************************************************************************/ @@ -4348,8 +4288,6 @@ static ZBX_DC_REGEXP *dc_regexp_remove_expression(const char *regexp_name, zbx_u /****************************************************************************** * * - * Function: DCsync_expressions * - * * * Purpose: Updates expressions configuration cache * * * * Parameters: result - [IN] the result of expressions database select * @@ -4441,8 +4379,6 @@ static void DCsync_expressions(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: DCsync_actions * - * * * Purpose: Updates actions configuration cache * * * * Parameters: sync - [IN] the db synchronization data * @@ -4513,8 +4449,6 @@ static void DCsync_actions(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: DCsync_action_ops * - * * * Purpose: Updates action operation class flags in configuration cache * * * * Parameters: sync - [IN] the db synchronization data * @@ -4549,8 +4483,6 @@ static void DCsync_action_ops(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dc_compare_action_conditions_by_type * - * * * Purpose: compare two action conditions by their type * * * * Comments: This function is used to sort action conditions by type. * @@ -4568,8 +4500,6 @@ static int dc_compare_action_conditions_by_type(const void *d1, const void *d2) /****************************************************************************** * * - * Function: DCsync_action_conditions * - * * * Purpose: Updates action conditions configuration cache * * * * Parameters: sync - [IN] the db synchronization data * @@ -4673,8 +4603,6 @@ static void DCsync_action_conditions(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: DCsync_correlations * - * * * Purpose: Updates correlations configuration cache * * * * Parameters: sync - [IN] the db synchronization data * @@ -4743,8 +4671,6 @@ static void DCsync_correlations(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dc_corr_condition_get_size * - * * * Purpose: get the actual size of correlation condition data depending on * * its type * * * @@ -4777,8 +4703,6 @@ static size_t dc_corr_condition_get_size(unsigned char type) /****************************************************************************** * * - * Function: dc_corr_condition_init_data * - * * * Purpose: initializes correlation condition data from database row * * * * Parameters: condition - [IN] the condition to initialize * @@ -4826,8 +4750,6 @@ static void dc_corr_condition_init_data(zbx_dc_corr_condition_t *condition, int /****************************************************************************** * * - * Function: corr_condition_free_data * - * * * Purpose: frees correlation condition data * * * * Parameters: condition - [IN] the condition * @@ -4857,8 +4779,6 @@ static void corr_condition_free_data(zbx_dc_corr_condition_t *condition) /****************************************************************************** * * - * Function: dc_compare_corr_conditions_by_type * - * * * Purpose: compare two correlation conditions by their type * * * * Comments: This function is used to sort correlation conditions by type. * @@ -4876,8 +4796,6 @@ static int dc_compare_corr_conditions_by_type(const void *d1, const void *d2) /****************************************************************************** * * - * Function: DCsync_corr_conditions * - * * * Purpose: Updates correlation conditions configuration cache * * * * Parameters: sync - [IN] the db synchronization data * @@ -4985,8 +4903,6 @@ static void DCsync_corr_conditions(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: DCsync_corr_operations * - * * * Purpose: Updates correlation operations configuration cache * * * * Parameters: result - [IN] the result of correlation operations database * @@ -5069,8 +4985,6 @@ static int dc_compare_hgroups(const void *d1, const void *d2) /****************************************************************************** * * - * Function: DCsync_hostgroups * - * * * Purpose: Updates host groups configuration cache * * * * Parameters: sync - [IN] the db synchronization data * @@ -5137,8 +5051,6 @@ static void DCsync_hostgroups(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: DCsync_trigger_tags * - * * * Purpose: Updates trigger tags in configuration cache * * * * Parameters: sync - [IN] the db synchronization data * @@ -5222,8 +5134,6 @@ static void DCsync_trigger_tags(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: DCsync_item_tags * - * * * Purpose: Updates item tags in configuration cache * * * * Parameters: sync - [IN] the db synchronization data * @@ -5307,8 +5217,6 @@ static void DCsync_item_tags(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: DCsync_host_tags * - * * * Purpose: Updates host tags in configuration cache * * * * Parameters: sync - [IN] the db synchronization data * @@ -5405,8 +5313,6 @@ static void DCsync_host_tags(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dc_compare_itemscript_param * - * * * Purpose: compare two item script parameters * * * ******************************************************************************/ @@ -5423,8 +5329,6 @@ static int dc_compare_itemscript_param(const void *d1, const void *d2) /****************************************************************************** * * - * Function: dc_compare_item_preproc_by_step * - * * * Purpose: compare two item preprocessing operations by step * * * * Comments: This function is used to sort correlation conditions by type. * @@ -5448,8 +5352,6 @@ static int dc_compare_preprocops_by_step(const void *d1, const void *d2) /****************************************************************************** * * - * Function: DCsync_item_preproc * - * * * Purpose: Updates item preprocessing steps in configuration cache * * * * Parameters: sync - [IN] the db synchronization data * @@ -5568,8 +5470,6 @@ static void DCsync_item_preproc(zbx_dbsync_t *sync, int timestamp) /****************************************************************************** * * - * Function: DCsync_itemscript_param * - * * * Purpose: Updates item script parameters in configuration cache * * * * Parameters: sync - [IN] the db synchronization data * @@ -5678,8 +5578,6 @@ static void DCsync_itemscript_param(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: DCsync_hostgroup_hosts * - * * * Purpose: Updates group hosts in configuration cache * * * * Parameters: sync - [IN] the db synchronization data * @@ -5742,8 +5640,6 @@ static void DCsync_hostgroup_hosts(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dc_trigger_update_topology * - * * * Purpose: updates trigger topology after trigger dependency changes * * * ******************************************************************************/ @@ -5772,8 +5668,6 @@ static int zbx_default_ptr_pair_ptr_compare_func(const void *d1, const void *d2) /****************************************************************************** * * - * Function: dc_trigger_update_cache * - * * * Purpose: updates trigger related cache data; * * 1) time triggers assigned to timer processes * * 2) trigger functionality (if it uses contain disabled * @@ -5858,8 +5752,6 @@ static void dc_trigger_update_cache(void) /****************************************************************************** * * - * Function: dc_hostgroups_update_cache * - * * * Purpose: updates hostgroup name index and resets nested group lists * * * ******************************************************************************/ @@ -5883,8 +5775,6 @@ static void dc_hostgroups_update_cache(void) /****************************************************************************** * * - * Function: dc_load_trigger_queue * - * * * Purpose: load trigger queue from database * * * * Comments: This function is called when syncing configuration cache for the * @@ -5925,8 +5815,6 @@ static void dc_load_trigger_queue(zbx_hashset_t *trend_functions) /****************************************************************************** * * - * Function: DCsync_configuration * - * * * Purpose: Synchronize configuration data from database * * * * Author: Alexander Vladishev, Aleksandrs Saveljevs * @@ -6990,8 +6878,6 @@ static int __config_data_session_compare(const void *d1, const void *d2) /****************************************************************************** * * - * Function: init_configuration_cache * - * * * Purpose: Allocate shared memory for configuration cache * * * * Author: Alexander Vladishev, Aleksandrs Saveljevs * @@ -7187,8 +7073,6 @@ out: /****************************************************************************** * * - * Function: free_configuration_cache * - * * * Purpose: Free memory allocated for configuration cache * * * * Author: Alexei Vladishev, Aleksandrs Saveljevs * @@ -7213,8 +7097,6 @@ void free_configuration_cache(void) /****************************************************************************** * * - * Function: in_maintenance_without_data_collection * - * * * Parameters: maintenance_status - [IN] maintenance status * * HOST_MAINTENANCE_STATUS_* flag * * maintenance_type - [IN] maintenance type * @@ -7308,8 +7190,6 @@ static void DCget_host(DC_HOST *dst_host, const ZBX_DC_HOST *src_host, unsigned /****************************************************************************** * * - * Function: DCget_host_by_hostid * - * * * Purpose: Locate host in configuration cache * * * * Parameters: host - [OUT] pointer to DC_HOST structure * @@ -7340,8 +7220,6 @@ int DCget_host_by_hostid(DC_HOST *host, zbx_uint64_t hostid) /****************************************************************************** * * - * Function: DCcheck_proxy_permissions * - * * * Purpose: * * Check access rights for an active proxy and get the proxy ID * * * @@ -7469,8 +7347,6 @@ int DCcheck_proxy_permissions(const char *host, const zbx_socket_t *sock, zbx_ui #if defined(HAVE_GNUTLS) || defined(HAVE_OPENSSL) /****************************************************************************** * * - * Function: DCget_psk_by_identity * - * * * Purpose: * * Find PSK with the specified identity in configuration cache * * * @@ -7547,8 +7423,6 @@ size_t DCget_psk_by_identity(const unsigned char *psk_identity, unsigned char *p /****************************************************************************** * * - * Function: DCget_autoregistration_psk * - * * * Purpose: * * Copy autoregistration PSK identity and value from configuration cache * * into caller's buffers * @@ -8097,8 +7971,6 @@ static void DCclean_trigger(DC_TRIGGER *trigger) /****************************************************************************** * * - * Function: DCconfig_get_items_by_keys * - * * * Purpose: locate item in configuration cache by host and key * * * * Parameters: items - [OUT] pointer to array of DC_ITEM structures * @@ -8156,8 +8028,6 @@ int DCconfig_get_hostid_by_name(const char *host, zbx_uint64_t *hostid) /****************************************************************************** * * - * Function: DCconfig_get_items_by_itemids * - * * * Purpose: Get item with specified ID * * * * Parameters: items - [OUT] pointer to DC_ITEM structures * @@ -8249,8 +8119,6 @@ void DCconfig_get_items_by_itemids_partial(DC_ITEM *items, const zbx_uint64_t *i /****************************************************************************** * * - * Function: dc_preproc_item_init * - * * * Purpose: initialize new preprocessor item from configuration cache * * * * Parameters: item - [OUT] the item to initialize * @@ -8294,8 +8162,6 @@ static int dc_preproc_item_init(zbx_preproc_item_t *item, zbx_uint64_t itemid) /****************************************************************************** * * - * Function: DCconfig_get_preprocessable_items * - * * * Purpose: get preprocessable items: * * * items with preprocessing steps * * * items with dependent items * @@ -8460,8 +8326,6 @@ void DCconfig_get_triggers_by_triggerids(DC_TRIGGER *triggers, const zbx_uint64_ /****************************************************************************** * * - * Function: DCconfig_get_functions_by_functionids * - * * * Purpose: Get functions by IDs * * * * Parameters: functions - [OUT] pointer to DC_FUNCTION structures * @@ -8497,8 +8361,6 @@ void DCconfig_get_functions_by_functionids(DC_FUNCTION *functions, zbx_uint64_t /****************************************************************************** * * - * Function: DCconfig_clean_functions * - * * * Author: Alexander Vladishev * * * ******************************************************************************/ @@ -8530,8 +8392,6 @@ void DCconfig_clean_triggers(DC_TRIGGER *triggers, int *errcodes, size_t num) /****************************************************************************** * * - * Function: DCconfig_lock_triggers_by_history_items * - * * * Purpose: Lock triggers for specified items so that multiple processes do * * not process one trigger simultaneously. Otherwise, this leads to * * problems like multiple successive OK events or escalations being * @@ -8617,8 +8477,6 @@ next:; /****************************************************************************** * * - * Function: DCconfig_lock_triggers_by_triggerids * - * * * Purpose: Lock triggers so that multiple processes do not process one * * trigger simultaneously. * * * @@ -8653,8 +8511,6 @@ void DCconfig_lock_triggers_by_triggerids(zbx_vector_uint64_t *triggerids_in, zb /****************************************************************************** * * - * Function: DCconfig_unlock_triggers * - * * * Author: Aleksandrs Saveljevs * * * ******************************************************************************/ @@ -8679,8 +8535,6 @@ void DCconfig_unlock_triggers(const zbx_vector_uint64_t *triggerids) /****************************************************************************** * * - * Function: DCconfig_unlock_all_triggers * - * * * Purpose: Unlocks all locked triggers before doing full history sync at * * program exit * * * @@ -8702,8 +8556,6 @@ void DCconfig_unlock_all_triggers(void) /****************************************************************************** * * - * Function: DCconfig_get_triggers_by_itemids * - * * * Purpose: get enabled triggers for specified items * * * * Author: Aleksandrs Saveljevs * @@ -8761,8 +8613,6 @@ void DCconfig_get_triggers_by_itemids(zbx_hashset_t *trigger_info, zbx_vector_pt /****************************************************************************** * * - * Function: DCconfig_find_active_time_function * - * * * Purpose: check if the expression contains time based functions * * * * Parameters: expression - [IN] the original expression * @@ -8813,8 +8663,6 @@ out: /****************************************************************************** * * - * Function: zbx_dc_get_triggers_by_timers * - * * * Purpose: gets timer triggers from cache * * * * Parameters: trigger_info - [IN/OUT] triggers * @@ -8882,8 +8730,6 @@ void zbx_dc_get_triggers_by_timers(zbx_hashset_t *trigger_info, zbx_vector_ptr_t /****************************************************************************** * * - * Function: trigger_timer_validate * - * * * Purpose: validate trigger timer * * * * Parameters: timer - [IN] trigger timer * @@ -8934,8 +8780,6 @@ static int trigger_timer_validate(zbx_trigger_timer_t *timer, ZBX_DC_TRIGGER **d /****************************************************************************** * * - * Function: zbx_dc_get_trigger_timers * - * * * Purpose: gets timers from trigger queue * * * * Parameters: timers - [OUT] the timer triggers that must be processed * @@ -9037,8 +8881,6 @@ void zbx_dc_get_trigger_timers(zbx_vector_ptr_t *timers, int now, int soft_limit /****************************************************************************** * * - * Function: dc_reschedule_trigger_timers * - * * * Purpose: reschedule trigger timers * * * * Comments: Triggers are unlocked by DCconfig_unlock_triggers() * @@ -9086,8 +8928,6 @@ static void dc_reschedule_trigger_timers(zbx_vector_ptr_t *timers) /****************************************************************************** * * - * Function: zbx_dc_reschedule_trigger_timers * - * * * Purpose: reschedule trigger timers while locking configuration cache * * * * Comments: Triggers are unlocked by DCconfig_unlock_triggers() * @@ -9117,8 +8957,6 @@ void zbx_dc_reschedule_trigger_timers(zbx_vector_ptr_t *timers, int now) /****************************************************************************** * * - * Function: zbx_dc_get_timer_queue * - * * * Purpose: clears timer trigger queue * * * ******************************************************************************/ @@ -9153,8 +8991,6 @@ void zbx_dc_clear_timer_queue(zbx_vector_ptr_t *timers) /****************************************************************************** * * - * Function: zbx_dc_free_timers * - * * ******************************************************************************/ void zbx_dc_free_timers(zbx_vector_ptr_t *timers) { @@ -9266,8 +9102,6 @@ static int dc_get_interface_by_type(DC_INTERFACE *interface, zbx_uint64_t hostid /****************************************************************************** * * - * Function: DCconfig_get_interface_by_type * - * * * Purpose: Locate main interface of specified type in configuration cache * * * * Parameters: interface - [OUT] pointer to DC_INTERFACE structure * @@ -9292,8 +9126,6 @@ int DCconfig_get_interface_by_type(DC_INTERFACE *interface, zbx_uint64_t hostid, /****************************************************************************** * * - * Function: DCconfig_get_interface * - * * * Purpose: Locate interface in configuration cache * * * * Parameters: interface - [OUT] pointer to DC_INTERFACE structure * @@ -9349,8 +9181,6 @@ unlock: /****************************************************************************** * * - * Function: dc_config_get_queue_nextcheck * - * * * Purpose: Get nextcheck for selected queue * * * * Parameters: queue - [IN] the queue * @@ -9379,8 +9209,6 @@ static int dc_config_get_queue_nextcheck(zbx_binary_heap_t *queue) /****************************************************************************** * * - * Function: DCconfig_get_poller_nextcheck * - * * * Purpose: Get nextcheck for selected poller * * * * Parameters: poller_type - [IN] poller type (ZBX_POLLER_TYPE_...) * @@ -9427,8 +9255,6 @@ static void dc_requeue_item(ZBX_DC_ITEM *dc_item, const ZBX_DC_HOST *dc_host, co /****************************************************************************** * * - * Function: dc_requeue_item_at * - * * * Purpose: requeues items at the specified time * * * * Parameters: dc_item - [IN] the item to reque * @@ -9454,8 +9280,6 @@ static void dc_requeue_item_at(ZBX_DC_ITEM *dc_item, ZBX_DC_HOST *dc_host, int n /****************************************************************************** * * - * Function: DCconfig_get_poller_items * - * * * Purpose: Get array of items for selected poller * * * * Parameters: poller_type - [IN] poller type (ZBX_POLLER_TYPE_...) * @@ -9614,8 +9438,6 @@ int DCconfig_get_poller_items(unsigned char poller_type, DC_ITEM **items) /****************************************************************************** * * - * Function: DCconfig_get_ipmi_poller_items * - * * * Purpose: Get array of items for IPMI poller * * * * Parameters: now - [IN] current timestamp * @@ -9709,8 +9531,6 @@ int DCconfig_get_ipmi_poller_items(int now, DC_ITEM *items, int items_num, int * /****************************************************************************** * * - * Function: DCconfig_get_snmp_interfaceids_by_addr * - * * * Purpose: get array of interface IDs for the specified address * * * * Return value: number of interface IDs returned * @@ -9749,8 +9569,6 @@ unlock: /****************************************************************************** * * - * Function: DCconfig_get_snmp_items_by_interfaceid * - * * * Purpose: get array of snmp trap items for the specified interfaceid * * * * Return value: number of items returned * @@ -9891,8 +9709,6 @@ void DCpoller_requeue_items(const zbx_uint64_t *itemids, const int *lastclocks, /****************************************************************************** * * - * Function: zbx_dc_requeue_unreachable_items * - * * * Purpose: requeue unreachable items * * * * Parameters: itemids - [IN] the item id array * @@ -9942,8 +9758,6 @@ void zbx_dc_requeue_unreachable_items(zbx_uint64_t *itemids, size_t itemids_num) /****************************************************************************** * * - * Function: DCinterface_get_agent_availability * - * * * Purpose: get interface availability data for the specified agent * * * * Parameters: dc_interface - [IN] the interface * @@ -9996,8 +9810,6 @@ static void DCagent_set_availability(zbx_agent_availability_t *av, unsigned cha /****************************************************************************** * * - * Function: DCinterface_set_agent_availability * - * * * Purpose: set interface availability data in configuration cache * * * * Parameters: dc_interface - [OUT] the interface * @@ -10030,8 +9842,6 @@ static int DCinterface_set_agent_availability(ZBX_DC_INTERFACE *dc_interface, in /****************************************************************************** * * - * Function: DCinterface_set_availability * - * * * Purpose: set interface availability data in configuration cache * * * * Parameters: dc_interface - [OUT] the interface * @@ -10066,8 +9876,6 @@ static int DCinterface_set_availability(ZBX_DC_INTERFACE *dc_interface, int now, /****************************************************************************** * * - * Function: zbx_interface_availability_init * - * * * Purpose: initializes interface availability data * * * * Parameters: availability - [IN/OUT] interface availability data * @@ -10082,8 +9890,6 @@ void zbx_interface_availability_init(zbx_interface_availability_t *availability, /******************************************************************************** * * - * Function: zbx_interface_availability_clean * - * * * Purpose: releases resources allocated to store interface availability data * * * * Parameters: ia - [IN] interface availability data * @@ -10096,8 +9902,6 @@ void zbx_interface_availability_clean(zbx_interface_availability_t *ia) /****************************************************************************** * * - * Function: zbx_interface_availability_free * - * * * Purpose: frees interface availability data * * * * Parameters: availability - [IN] interface availability data * @@ -10112,8 +9916,6 @@ void zbx_interface_availability_free(zbx_interface_availability_t *availability) ZBX_PTR_VECTOR_IMPL(availability_ptr, zbx_interface_availability_t *) /****************************************************************************** * * - * Function: zbx_agent_availability_init * - * * * Purpose: initializes agent availability with the specified data * * * * Parameters: agent - [IN/OUT] agent availability data * @@ -10135,8 +9937,6 @@ static void zbx_agent_availability_init(zbx_agent_availability_t *agent, unsigne /****************************************************************************** * * - * Function: zbx_interface_availability_is_set * - * * * Purpose: checks interface availability if agent availability field is set * * * * Parameters: ia - [IN] interface availability data * @@ -10194,8 +9994,6 @@ int zbx_interface_availability_is_set(const zbx_interface_availability_t *ia) /******************************************************************************* * * - * Function: DCinterface_activate * - * * * Purpose: set interface as available based on the agent availability data * * * * Parameters: interfaceid - [IN] the interface identifier * @@ -10257,8 +10055,6 @@ out: /************************************************************************************ * * - * Function: DCinterface_deactivate * - * * * Purpose: attempt to set interface as unavailable based on agent availability * * * * Parameters: interfaceid - [IN] the interface identifier * @@ -10359,8 +10155,6 @@ out: /****************************************************************************** * * - * Function: DCset_interfaces_availability * - * * * Purpose: update availability of interfaces in configuration cache and * * return the updated field flags * * * @@ -10480,8 +10274,6 @@ static int DCconfig_check_trigger_dependencies_rec(const ZBX_DC_TRIGGER_DEPLIST /****************************************************************************** * * - * Function: DCconfig_check_trigger_dependencies * - * * * Purpose: check whether any of trigger dependencies have value PROBLEM * * * * Return value: SUCCEED - trigger can change its value * @@ -10555,8 +10347,6 @@ exit: /****************************************************************************** * * - * Function: DCconfig_sort_triggers_topologically * - * * * Purpose: assign each trigger an index based on trigger dependency topology * * * * Author: Aleksandrs Saveljevs * @@ -10583,8 +10373,6 @@ static void DCconfig_sort_triggers_topologically(void) /****************************************************************************** * * - * Function: DCconfig_triggers_apply_changes * - * * * Purpose: apply trigger value,state,lastchange or error changes to * * configuration cache after committed to database * * * @@ -10625,8 +10413,6 @@ void DCconfig_triggers_apply_changes(zbx_vector_ptr_t *trigger_diff) /****************************************************************************** * * - * Function: DCconfig_get_stats * - * * * Purpose: get statistics of the database cache * * * * Author: Alexander Vladishev, Aleksandrs Saveljevs * @@ -10739,8 +10525,6 @@ int DCconfig_get_last_sync_time(void) /****************************************************************************** * * - * Function: DCconfig_get_proxypoller_hosts * - * * * Purpose: Get array of proxies for proxy poller * * * * Parameters: hosts - [OUT] array of hosts * @@ -10794,8 +10578,6 @@ int DCconfig_get_proxypoller_hosts(DC_PROXY *proxies, int max_hosts) /****************************************************************************** * * - * Function: DCconfig_get_proxypoller_nextcheck * - * * * Purpose: Get nextcheck for passive proxies * * * * Return value: nextcheck or FAIL if no passive proxies in queue * @@ -11086,8 +10868,6 @@ out: /****************************************************************************** * * - * Function: dc_expand_user_macros * - * * * Purpose: expand user macros in the specified text value * * * * Parameters: text - [IN] the text value to expand * @@ -11170,8 +10950,6 @@ int dc_expand_user_macros_len(const char *text, size_t text_len, zbx_uint64_t *h /****************************************************************************** * * - * Function: zbx_dc_expand_user_macros_len * - * * * Purpose: expand user macros in the specified text * * * * Parameters: text - [IN] the text value to expand * @@ -11206,8 +10984,6 @@ int zbx_dc_expand_user_macros_len(const char *text, size_t text_len, zbx_uint64_ /****************************************************************************** * * - * Function: dc_expand_user_macros * - * * * Purpose: expand user macros in the specified text value * * WARNING - DO NOT USE FOR TRIGGERS, for triggers use the dedicated function * * * @@ -11269,8 +11045,6 @@ char *dc_expand_user_macros(const char *text, zbx_uint64_t *hostids, int hostids /****************************************************************************** * * - * Function: zbx_dc_expand_user_macros * - * * * Purpose: expand user macros in the specified text value * * * * Parameters: text - [IN] the text value to expand * @@ -11295,8 +11069,6 @@ char *zbx_dc_expand_user_macros(const char *text, zbx_uint64_t hostid) /****************************************************************************** * * - * Function: DCfree_item_queue * - * * * Purpose: frees the item queue data vector created by DCget_item_queue() * * * * Parameters: queue - [IN] the item queue data vector to free * @@ -11312,8 +11084,6 @@ void DCfree_item_queue(zbx_vector_ptr_t *queue) /****************************************************************************** * * - * Function: DCget_item_queue * - * * * Purpose: retrieves vector of delayed items * * * * Parameters: queue - [OUT] the vector of delayed items (optional) * @@ -11406,8 +11176,6 @@ int DCget_item_queue(zbx_vector_ptr_t *queue, int from, int to) /****************************************************************************** * * - * Function: dc_trigger_items_hosts_enabled * - * * * Purpose: check that functionids in trigger (recovery) expression * * * * Parameters: expression - [IN] trigger (recovery) expression * @@ -11459,8 +11227,6 @@ out: /****************************************************************************** * * - * Function: dc_status_update * - * * * Purpose: check when status information stored in configuration cache was * * updated last time and update it if necessary * * * @@ -11668,8 +11434,6 @@ static void dc_status_update(void) /****************************************************************************** * * - * Function: DCget_item_count * - * * * Purpose: return the number of active items * * * * Parameters: hostid - [IN] the host id, pass 0 to specify all hosts * @@ -11700,8 +11464,6 @@ zbx_uint64_t DCget_item_count(zbx_uint64_t hostid) /****************************************************************************** * * - * Function: DCget_item_unsupported_count * - * * * Purpose: return the number of active unsupported items * * * * Parameters: hostid - [IN] the host id, pass 0 to specify all hosts * @@ -11732,8 +11494,6 @@ zbx_uint64_t DCget_item_unsupported_count(zbx_uint64_t hostid) /****************************************************************************** * * - * Function: DCget_trigger_count * - * * * Purpose: count active triggers * * * ******************************************************************************/ @@ -11754,8 +11514,6 @@ zbx_uint64_t DCget_trigger_count(void) /****************************************************************************** * * - * Function: DCget_host_count * - * * * Purpose: count monitored and not monitored hosts * * * ******************************************************************************/ @@ -11776,8 +11534,6 @@ zbx_uint64_t DCget_host_count(void) /****************************************************************************** * * - * Function: DCget_required_performance * - * * * Return value: the required nvps number * * * ******************************************************************************/ @@ -11798,8 +11554,6 @@ double DCget_required_performance(void) /****************************************************************************** * * - * Function: DCget_count_stats_all * - * * * Purpose: retrieves all internal metrics of the configuration cache * * * * Parameters: stats - [OUT] the configuration cache statistics * @@ -11887,8 +11641,6 @@ void DCget_status(zbx_vector_ptr_t *hosts_monitored, zbx_vector_ptr_t *hosts_not /****************************************************************************** * * - * Function: DCget_expressions_by_names * - * * * Purpose: retrieves global expression data from cache * * * * Parameters: expressions - [OUT] a vector of expression data pointers * @@ -11939,8 +11691,6 @@ void DCget_expressions_by_names(zbx_vector_ptr_t *expressions, const char * cons /****************************************************************************** * * - * Function: DCget_expression * - * * * Purpose: retrieves regular expression data from cache * * * * Parameters: expressions - [OUT] a vector of expression data pointers * @@ -11957,8 +11707,6 @@ void DCget_expressions_by_name(zbx_vector_ptr_t *expressions, const char *name) /****************************************************************************** * * - * Function: DCget_data_expected_from * - * * * Purpose: Returns time since which data is expected for the given item. We * * would not mind not having data for the item before that time, but * * since that time we expect data to be coming. * @@ -11998,8 +11746,6 @@ unlock: /****************************************************************************** * * - * Function: dc_get_hostids_by_functionids * - * * * Purpose: get host identifiers for the specified list of functions * * * * Parameters: functionids - [IN] the function ids * @@ -12031,8 +11777,6 @@ void dc_get_hostids_by_functionids(const zbx_uint64_t *functionids, int function /****************************************************************************** * * - * Function: DCget_hostids_by_functionids * - * * * Purpose: get function host ids grouped by an object (trigger) id * * * * Parameters: functionids - [IN] the function ids * @@ -12054,8 +11798,6 @@ void DCget_hostids_by_functionids(zbx_vector_uint64_t *functionids, zbx_vector_u /****************************************************************************** * * - * Function: dc_get_hosts_by_functionids * - * * * Purpose: get hosts for the specified list of functions * * * * Parameters: functionids - [IN] the function ids * @@ -12089,8 +11831,6 @@ static void dc_get_hosts_by_functionids(const zbx_uint64_t *functionids, int fun /****************************************************************************** * * - * Function: DCget_hosts_by_functionids * - * * * Purpose: get hosts for the specified list of functions * * * * Parameters: functionids - [IN] the function ids * @@ -12112,8 +11852,6 @@ void DCget_hosts_by_functionids(const zbx_vector_uint64_t *functionids, zbx_hash /****************************************************************************** * * - * Function: DCget_internal_action_count * - * * * Purpose: get number of enabled internal actions * * * * Return value: number of enabled internal actions * @@ -12134,8 +11872,6 @@ unsigned int DCget_internal_action_count(void) /****************************************************************************** * * - * Function: zbx_config_get * - * * * Purpose: get global configuration data * * * * Parameters: cfg - [OUT] the global configuration data * @@ -12196,8 +11932,6 @@ void zbx_config_get(zbx_config_t *cfg, zbx_uint64_t flags) /****************************************************************************** * * - * Function: zbx_config_get_hk_mode * - * * * Purpose: get housekeeping mode for history and trends tables * * * * Parameters: history_mode - [OUT] history housekeeping mode, can be either * @@ -12216,8 +11950,6 @@ void zbx_config_get_hk_mode(unsigned char *history_mode, unsigned char *trends_m /****************************************************************************** * * - * Function: zbx_config_clean * - * * * Purpose: cleans global configuration data structure filled * * by zbx_config_get() function * * * @@ -12245,8 +11977,6 @@ void zbx_config_clean(zbx_config_t *cfg) /********************************************************************************* * * - * Function: DCreset_interfaces_availability * - * * * Purpose: resets interfaces availability for disabled hosts and hosts * * without enabled items for the corresponding interface * * * @@ -12342,8 +12072,6 @@ int DCreset_interfaces_availability(zbx_vector_availability_ptr_t *interfaces) /******************************************************************************* * * - * Function: DCget_interfaces_availability * - * * * Purpose: gets availability data for interfaces with availability data * * changed in period from last availability update to the specified * * timestamp * @@ -12394,8 +12122,6 @@ int DCget_interfaces_availability(zbx_vector_ptr_t *interfaces, int *ts) /****************************************************************************** * * - * Function: DCtouch_interfaces_availability * - * * * Purpose: sets availability timestamp to current time for the specified * * interfaces * * * @@ -12426,8 +12152,6 @@ void DCtouch_interfaces_availability(const zbx_vector_uint64_t *interfaceids) /****************************************************************************** * * - * Function: dc_action_copy_conditions * - * * * Purpose: copies configuration cache action conditions to the specified * * vector * * * @@ -12463,8 +12187,6 @@ static void dc_action_copy_conditions(const zbx_dc_action_t *dc_action, zbx_vect /****************************************************************************** * * - * Function: dc_action_eval_create * - * * * Purpose: creates action evaluation data from configuration cache action * * * * Parameters: dc_action - [IN] the source action * @@ -12495,8 +12217,6 @@ static zbx_action_eval_t *dc_action_eval_create(const zbx_dc_action_t *dc_action /****************************************************************************** * * - * Function: zbx_dc_get_actions_eval * - * * * Purpose: gets action evaluation data * * * * Parameters: actions - [OUT] the action evaluation data * @@ -12534,8 +12254,6 @@ void zbx_dc_get_actions_eval(zbx_vector_ptr_t *actions, unsigned char opflags) /****************************************************************************** * * - * Function: zbx_set_availability_update_ts * - * * * Purpose: sets timestamp of the last availability update * * * * Parameter: ts - [IN] the last availability update timestamp * @@ -12552,8 +12270,6 @@ void zbx_set_availability_diff_ts(int ts) /****************************************************************************** * * - * Function: corr_condition_clean * - * * * Purpose: frees correlation condition * * * * Parameter: condition - [IN] the condition to free * @@ -12583,8 +12299,6 @@ static void corr_condition_clean(zbx_corr_condition_t *condition) /****************************************************************************** * * - * Function: dc_correlation_free * - * * * Purpose: frees global correlation rule * * * * Parameter: condition - [IN] the condition to free * @@ -12604,8 +12318,6 @@ static void dc_correlation_free(zbx_correlation_t *correlation) /****************************************************************************** * * - * Function: dc_corr_condition_copy * - * * * Purpose: copies cached correlation condition to memory * * * * Parameter: dc_condition - [IN] the condition to copy * @@ -12645,8 +12357,6 @@ static void dc_corr_condition_copy(const zbx_dc_corr_condition_t *dc_condition, /****************************************************************************** * * - * Function: zbx_dc_corr_operation_dup * - * * * Purpose: clones cached correlation operation to memory * * * * Parameter: operation - [IN] the operation to clone * @@ -12666,8 +12376,6 @@ static zbx_corr_operation_t *zbx_dc_corr_operation_dup(const zbx_dc_corr_operati /****************************************************************************** * * - * Function: dc_correlation_formula_dup * - * * * Purpose: clones cached correlation formula, generating it if necessary * * * * Parameter: correlation - [IN] the correlation * @@ -12788,8 +12496,6 @@ void zbx_dc_correlation_rules_free(zbx_correlation_rules_t *rules) /****************************************************************************** * * - * Function: zbx_dc_correlation_get_rules * - * * * Purpose: gets correlation rules from configuration cache * * * * Parameter: rules - [IN/OUT] the correlation rules * @@ -12855,8 +12561,6 @@ void zbx_dc_correlation_rules_get(zbx_correlation_rules_t *rules) /****************************************************************************** * * - * Function: dc_hostgroup_cache_nested_groupids * - * * * Purpose: cache nested group identifiers * * * ******************************************************************************/ @@ -12891,8 +12595,6 @@ void dc_hostgroup_cache_nested_groupids(zbx_dc_hostgroup_t *parent_group) /****************************************************************************** * * - * Function: dc_maintenance_precache_nested_groups * - * * * Purpose: pre-caches nested groups for groups used in running maintenances * * * ******************************************************************************/ @@ -12935,8 +12637,6 @@ static void dc_maintenance_precache_nested_groups(void) /****************************************************************************** * * - * Function: dc_get_nested_hostgroupids * - * * * Purpose: gets nested group ids for the specified host group * * (including the target group id) * * * @@ -12969,8 +12669,6 @@ void dc_get_nested_hostgroupids(zbx_uint64_t groupid, zbx_vector_uint64_t *neste /****************************************************************************** * * - * Function: zbx_dc_get_nested_hostgroupids * - * * * Purpose: gets nested group ids for the specified host groups * * * * Parameter: groupids - [IN] the parent group identifiers * @@ -12995,8 +12693,6 @@ void zbx_dc_get_nested_hostgroupids(zbx_uint64_t *groupids, int groupids_num, zb /****************************************************************************** * * - * Function: zbx_dc_get_hostids_by_group_name * - * * * Purpose: gets hostids belonging to the group and its nested groups * * * * Parameter: name - [IN] the group name * @@ -13055,8 +12751,6 @@ void zbx_dc_get_hostids_by_group_name(const char *name, zbx_vector_uint64_t *hos /****************************************************************************** * * - * Function: zbx_dc_get_active_proxy_by_name * - * * * Purpose: gets active proxy data by its name from configuration cache * * * * Parameters: * @@ -13105,8 +12799,6 @@ out: /****************************************************************************** * * - * Function: zbx_dc_items_update_nextcheck * - * * * Purpose: updates item nextcheck values in configuration cache * * * * Parameters: items - [IN] the items to update * @@ -13162,8 +12854,6 @@ void zbx_dc_items_update_nextcheck(DC_ITEM *items, zbx_agent_value_t *values, in /****************************************************************************** * * - * Function: zbx_dc_get_host_interfaces * - * * * Purpose: get data of all network interfaces for a host in configuration * * cache * * * @@ -13241,8 +12931,6 @@ unlock: /****************************************************************************** * * - * Function: DCconfig_items_apply_changes * - * * * Purpose: apply item state, error, mtime, lastlogsize changes to * * configuration cache * * * @@ -13283,8 +12971,6 @@ void DCconfig_items_apply_changes(const zbx_vector_ptr_t *item_diff) /****************************************************************************** * * - * Function: DCconfig_update_inventory_values * - * * * Purpose: update automatic inventory in configuration cache * * * ******************************************************************************/ @@ -13318,8 +13004,6 @@ void DCconfig_update_inventory_values(const zbx_vector_ptr_t *inventory_values) /****************************************************************************** * * - * Function: dc_get_host_inventory_value_by_hostid * - * * * Purpose: find inventory value in automatically populated cache, if not * * found then look in main inventory cache * * * @@ -13350,8 +13034,6 @@ static int dc_get_host_inventory_value_by_hostid(zbx_uint64_t hostid, char **rep /****************************************************************************** * * - * Function: DCget_host_inventory_value_by_itemid * - * * * Purpose: find inventory value in automatically populated cache, if not * * found then look in main inventory cache * * * @@ -13373,8 +13055,6 @@ int DCget_host_inventory_value_by_itemid(zbx_uint64_t itemid, char **replace_to, /****************************************************************************** * * - * Function: DCget_host_inventory_value_by_hostid * - * * * Purpose: find inventory value in automatically populated cache, if not * * found then look in main inventory cache * * * @@ -13394,8 +13074,6 @@ int DCget_host_inventory_value_by_hostid(zbx_uint64_t hostid, char **replace_to, /****************************************************************************** * * - * Function: zbx_dc_get_trigger_dependencies * - * * * Purpose: checks/returns trigger dependencies for a set of triggers * * * * Parameter: triggerids - [IN] the currently processing trigger ids * @@ -13459,8 +13137,6 @@ void zbx_dc_get_trigger_dependencies(const zbx_vector_uint64_t *triggerids, zbx_ /****************************************************************************** * * - * Function: zbx_dc_reschedule_items * - * * * Purpose: reschedules items that are processed by the target daemon * * * * Parameter: itemids - [IN] the item identifiers * @@ -13515,8 +13191,6 @@ void zbx_dc_reschedule_items(const zbx_vector_uint64_t *itemids, int nextcheck, /****************************************************************************** * * - * Function: zbx_dc_proxy_update_nodata * - * * * Purpose: stop suppress mode of the nodata() trigger * * * * Parameter: subscriptions - [IN] the array of trigger id and time of values * @@ -13564,8 +13238,6 @@ void zbx_dc_proxy_update_nodata(zbx_vector_uint64_pair_t *subscriptions) /****************************************************************************** * * - * Function: zbx_dc_update_proxy * - * * * Purpose: updates changed proxy data in configuration cache and updates * * diff flags to reflect the updated data * * * @@ -13655,8 +13327,6 @@ void zbx_dc_update_proxy(zbx_proxy_diff_t *diff) /****************************************************************************** * * - * Function: zbx_dc_get_proxy_lastaccess * - * * * Purpose: returns proxy lastaccess changes since last lastaccess request * * * * Parameter: lastaccess - [OUT] last access updates for proxies that need * @@ -13697,8 +13367,6 @@ void zbx_dc_get_proxy_lastaccess(zbx_vector_uint64_pair_t *lastaccess) /****************************************************************************** * * - * Function: zbx_dc_get_session_token * - * * * Purpose: returns session token * * * * Return value: pointer to session token (NULL for server). * @@ -13715,8 +13383,6 @@ const char *zbx_dc_get_session_token(void) /****************************************************************************** * * - * Function: zbx_dc_get_or_create_data_session * - * * * Purpose: returns data session, creates a new session if none found * * * * Parameter: hostid - [IN] the host (proxy) identifier * @@ -13761,8 +13427,6 @@ zbx_data_session_t *zbx_dc_get_or_create_data_session(zbx_uint64_t hostid, const /****************************************************************************** * * - * Function: zbx_dc_cleanup_data_sessions * - * * * Purpose: removes data sessions not accessed for 24 hours * * * ******************************************************************************/ @@ -13910,8 +13574,6 @@ void zbx_dc_get_item_tags_by_functionids(const zbx_uint64_t *functionids, size_t /****************************************************************************** * * - * Function: DCget_proxy_nodata_win * - * * * Purpose: retrieves proxy suppress window data from the cache * * * * Parameters: hostid - [IN] proxy host id * @@ -13950,8 +13612,6 @@ int DCget_proxy_nodata_win(zbx_uint64_t hostid, zbx_proxy_suppress_t *nodata_win /****************************************************************************** * * - * Function: DCget_proxy_delay * - * * * Purpose: retrieves proxy delay from the cache * * * * Parameters: hostid - [IN] proxy host id * @@ -13984,8 +13644,6 @@ int DCget_proxy_delay(zbx_uint64_t hostid, int *delay) /****************************************************************************** * * - * Function: DCget_proxy_delay_by_name * - * * * Purpose: retrieves proxy delay from the cache * * * * Parameters: name - [IN] proxy host name * @@ -14021,8 +13679,6 @@ int DCget_proxy_delay_by_name(const char *name, int *delay, char **error) /****************************************************************************** * * - * Function: zbx_dc_set_macro_env * - * * * Purpose: sets user macro environment security level * * * * Parameter: env - [IN] the security level (see ZBX_MACRO_ENV_* defines) * @@ -14040,8 +13696,6 @@ unsigned char zbx_dc_set_macro_env(unsigned char env) /****************************************************************************** * * - * Function: zbx_dc_get_instanceid * - * * * Purpose: returns server/proxy instance id * * * * Return value: the instance id * @@ -14056,8 +13710,6 @@ const char *zbx_dc_get_instanceid(void) /****************************************************************************** * * - * Function: dc_expand_user_macros_in_func_params * - * * * Purpose: expand user macros in trigger function parameters * * * * Parameters: params - [IN] the function parameters * @@ -14107,8 +13759,6 @@ char *dc_expand_user_macros_in_func_params(const char *params, zbx_uint64_t host /********************************************************************************* * * - * Function: zbx_get_host_interfaces_availability * - * * * Purpose: get host interfaces availability * * * * Parameters: hostid - [IN] the host id * @@ -14157,8 +13807,6 @@ void zbx_get_host_interfaces_availability(zbx_uint64_t hostid, zbx_agent_availab /********************************************************************************* * * - * Function: zbx_dc_eval_expand_user_macros * - * * * Purpose: resolve user macros in parsed expression * * * * Parameters: ctx - [IN] the expression evaluation context * diff --git a/src/libs/zbxdbcache/dbconfig_maintenance.c b/src/libs/zbxdbcache/dbconfig_maintenance.c index 4d834306251..efcb7c55a77 100644 --- a/src/libs/zbxdbcache/dbconfig_maintenance.c +++ b/src/libs/zbxdbcache/dbconfig_maintenance.c @@ -46,8 +46,6 @@ zbx_host_event_maintenance_t; /****************************************************************************** * * - * Function: DCsync_maintenances * - * * * Purpose: Updates maintenances in configuration cache * * * * Parameters: sync - [IN] the db synchronization data * @@ -126,8 +124,6 @@ void DCsync_maintenances(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dc_compare_maintenance_tags * - * * * Purpose: compare maintenance tags by tag name for sorting * * * ******************************************************************************/ @@ -141,8 +137,6 @@ static int dc_compare_maintenance_tags(const void *d1, const void *d2) /****************************************************************************** * * - * Function: DCsync_maintenance_tags * - * * * Purpose: Updates maintenance tags in configuration cache * * * * Parameters: sync - [IN] the db synchronization data * @@ -246,8 +240,6 @@ void DCsync_maintenance_tags(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: DCsync_maintenance_periods * - * * * Purpose: Updates maintenance period in configuration cache * * * * Parameters: sync - [IN] the db synchronization data * @@ -338,8 +330,6 @@ void DCsync_maintenance_periods(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: DCsync_maintenance_groups * - * * * Purpose: Updates maintenance groups in configuration cache * * * * Parameters: sync - [IN] the db synchronization data * @@ -411,8 +401,6 @@ void DCsync_maintenance_groups(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: DCsync_maintenance_hosts * - * * * Purpose: Updates maintenance hosts in configuration cache * * * * Parameters: sync - [IN] the db synchronization data * @@ -500,8 +488,6 @@ void DCsync_maintenance_hosts(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dc_subtract_time * - * * * Purpose: subtract two local times with DST correction * * * * Parameter: minuend - [IN] the minuend time * @@ -525,8 +511,6 @@ static time_t dc_subtract_time(time_t minuend, int subtrahend, struct tm *tm) /****************************************************************************** * * - * Function: dc_calculate_maintenance_period * - * * * Purpose: calculate start time for the specified maintenance period * * * * Parameter: maintenance - [IN] the maintenance * @@ -651,8 +635,6 @@ static int dc_calculate_maintenance_period(const zbx_dc_maintenance_t *maintenan /****************************************************************************** * * - * Function: dc_check_maintenance_period * - * * * Purpose: calculates start time for the specified maintenance period and * * checks if we are inside the maintenance period * * * @@ -703,8 +685,6 @@ out: /****************************************************************************** * * - * Function: zbx_dc_maintenance_set_update_flags * - * * * Purpose: sets maintenance update flags for all timers * * * ******************************************************************************/ @@ -724,8 +704,6 @@ void zbx_dc_maintenance_set_update_flags(void) /****************************************************************************** * * - * Function: zbx_dc_maintenance_reset_update_flag * - * * * Purpose: resets maintenance update flags for the specified timer * * * * Parameters: timer - [IN] the timer process number * @@ -751,8 +729,6 @@ void zbx_dc_maintenance_reset_update_flag(int timer) /****************************************************************************** * * - * Function: zbx_dc_maintenance_check_update_flag * - * * * Purpose: checks if the maintenance update flag is set for the specified * * timer * * * @@ -783,8 +759,6 @@ int zbx_dc_maintenance_check_update_flag(int timer) /****************************************************************************** * * - * Function: zbx_dc_maintenance_check_update_flags * - * * * Purpose: checks if at least one maintenance update flag is set * * * * Return value: SUCCEED - a maintenance update flag is set * @@ -815,8 +789,6 @@ out: /****************************************************************************** * * - * Function: zbx_dc_update_maintenances * - * * * Purpose: update maintenance state depending on maintenance periods * * * * Return value: SUCCEED - maintenance status was changed, host/event update * @@ -930,8 +902,6 @@ int zbx_dc_update_maintenances(void) /****************************************************************************** * * - * Function: dc_assign_maintenance_to_host * - * * * Purpose: assign maintenance to a host, host can only be in one maintenance * * * * Parameters: host_maintenances - [OUT] host with maintenance * @@ -960,8 +930,6 @@ static void dc_assign_maintenance_to_host(zbx_hashset_t *host_maintenances, zbx_ /****************************************************************************** * * - * Function: dc_assign_event_maintenance_to_host * - * * * Purpose: assign maintenance to a host that event belongs to, events can be * * in multiple maintenances at a time * * * @@ -995,8 +963,6 @@ typedef void (*assign_maintenance_to_host_f)(zbx_hashset_t *host_maintenances, /****************************************************************************** * * - * Function: dc_get_host_maintenances_by_ids * - * * * Purpose: get hosts and their maintenances * * * * Parameters: maintenanceids - [IN] the maintenance ids * @@ -1060,8 +1026,6 @@ static void dc_get_host_maintenances_by_ids(const zbx_vector_uint64_t *maintenan /****************************************************************************** * * - * Function: dc_get_host_maintenance_updates * - * * * Purpose: gets maintenance updates for all hosts * * * * Parameters: host_maintenances - [IN] the maintenances running on hosts * @@ -1130,8 +1094,6 @@ static void dc_get_host_maintenance_updates(zbx_hashset_t *host_maintenances, zb /****************************************************************************** * * - * Function: zbx_dc_flush_host_maintenance_updates * - * * * Purpose: flush host maintenance updates to configuration cache * * * * Parameters: updates - [IN] the updates to flush * @@ -1190,8 +1152,6 @@ void zbx_dc_flush_host_maintenance_updates(const zbx_vector_ptr_t *updates) /****************************************************************************** * * - * Function: zbx_dc_get_host_maintenance_updates * - * * * Purpose: calculates required host maintenance updates based on specified * * maintenances * * * @@ -1232,8 +1192,6 @@ void zbx_dc_get_host_maintenance_updates(const zbx_vector_uint64_t *maintenancei /****************************************************************************** * * - * Function: dc_maintenance_tag_match * - * * * Purpose: perform maintenance tag comparison using maintenance tag operator * * * ******************************************************************************/ @@ -1253,8 +1211,6 @@ static int dc_maintenance_tag_value_match(const zbx_dc_maintenance_tag_t *mt, co /****************************************************************************** * * - * Function: dc_maintenance_match_tag_range * - * * * Purpose: matches tags with [*mt_pos] maintenance tag name * * * * Parameters: mtags - [IN] the maintenance tags, sorted by tag names * @@ -1349,8 +1305,6 @@ static int dc_maintenance_match_tag_range(const zbx_vector_ptr_t *mtags, const z /****************************************************************************** * * - * Function: dc_maintenance_match_tags_or * - * * * Purpose: matches maintenance and event tags using OR eval type * * * * Parameters: mtags - [IN] the maintenance tags, sorted by tag names * @@ -1375,8 +1329,6 @@ static int dc_maintenance_match_tags_or(const zbx_dc_maintenance_t *maintenance, /****************************************************************************** * * - * Function: dc_maintenance_match_tags_andor * - * * * Purpose: matches maintenance and event tags using AND/OR eval type * * * * Parameters: mtags - [IN] the maintenance tags, sorted by tag names * @@ -1404,8 +1356,6 @@ static int dc_maintenance_match_tags_andor(const zbx_dc_maintenance_t *maintenan /****************************************************************************** * * - * Function: dc_maintenance_match_tags * - * * * Purpose: check if the tags must be processed by the specified maintenance * * * * Parameters: maintenance - [IN] the maintenance * @@ -1441,8 +1391,6 @@ static int dc_maintenance_match_tags(const zbx_dc_maintenance_t *maintenance, co /****************************************************************************** * * - * Function: dc_compare_tags * - * * * Purpose: compare maintenance tags by tag name for sorting * * * ******************************************************************************/ @@ -1461,8 +1409,6 @@ static void host_event_maintenance_clean(zbx_host_event_maintenance_t *host_even /****************************************************************************** * * - * Function: zbx_dc_get_event_maintenances * - * * * Purpose: get maintenance data for events * * * * Parameters: event_queries - [IN/OUT] in - event data * @@ -1620,8 +1566,6 @@ unlock: /****************************************************************************** * * - * Function: zbx_event_suppress_query_free * - * * * Purpose: free event suppress query structure * * * ******************************************************************************/ @@ -1636,8 +1580,6 @@ void zbx_event_suppress_query_free(zbx_event_suppress_query_t *query) /****************************************************************************** * * - * Function: zbx_dc_get_running_maintenanceids * - * * * Purpose: get identifiers of the running maintenances * * * * Return value: SUCCEED - at least one running maintenance was found * diff --git a/src/libs/zbxdbcache/dbsync.c b/src/libs/zbxdbcache/dbsync.c index 7ac7e159ffd..0c99ed2bde5 100644 --- a/src/libs/zbxdbcache/dbsync.c +++ b/src/libs/zbxdbcache/dbsync.c @@ -85,8 +85,6 @@ static void dbsync_strfree(char *str) /****************************************************************************** * * - * Function: dbsync_compare_uint64 * - * * * Purpose: compares 64 bit unsigned integer with a raw database value * * * ******************************************************************************/ @@ -101,8 +99,6 @@ static int dbsync_compare_uint64(const char *value_raw, zbx_uint64_t value) /****************************************************************************** * * - * Function: dbsync_compare_int * - * * * Purpose: compares 32 bit signed integer with a raw database value * * * ******************************************************************************/ @@ -113,8 +109,6 @@ static int dbsync_compare_int(const char *value_raw, int value) /****************************************************************************** * * - * Function: dbsync_compare_uchar * - * * * Purpose: compares unsigned character with a raw database value * * * ******************************************************************************/ @@ -129,8 +123,6 @@ static int dbsync_compare_uchar(const char *value_raw, unsigned char value) /****************************************************************************** * * - * Function: dbsync_compare_str * - * * * Purpose: compares string with a raw database value * * * ******************************************************************************/ @@ -142,8 +134,6 @@ static int dbsync_compare_str(const char *value_raw, const char *value) /****************************************************************************** * * - * Function: dbsync_add_row * - * * * Purpose: adds a new row to the changeset * * * * Parameter: sync - [IN] the changeset * @@ -191,8 +181,6 @@ static void dbsync_add_row(zbx_dbsync_t *sync, zbx_uint64_t rowid, unsigned char /****************************************************************************** * * - * Function: dbsync_prepare * - * * * Purpose: prepares changeset * * * * Parameter: sync - [IN] the changeset * @@ -214,8 +202,6 @@ static void dbsync_prepare(zbx_dbsync_t *sync, int columns_num, zbx_dbsync_prepr /****************************************************************************** * * - * Function: dbsync_check_row_macros * - * * * Purpose: checks if the specified column in the row contains user macros * * * * Parameter: row - [IN] the row to check * @@ -235,8 +221,6 @@ static int dbsync_check_row_macros(char **row, int column) /****************************************************************************** * * - * Function: dbsync_preproc_row * - * * * Purpose: applies necessary pre-processing before row is compared/used * * * * Parameter: sync - [IN] the changeset * @@ -271,8 +255,6 @@ static char **dbsync_preproc_row(zbx_dbsync_t *sync, char **row) /****************************************************************************** * * - * Function: zbx_dbsync_init_env * - * * ******************************************************************************/ void zbx_dbsync_init_env(ZBX_DC_CONFIG *cache) { @@ -282,8 +264,6 @@ void zbx_dbsync_init_env(ZBX_DC_CONFIG *cache) /****************************************************************************** * * - * Function: dbsync_env_release * - * * ******************************************************************************/ void zbx_dbsync_free_env(void) { @@ -292,8 +272,6 @@ void zbx_dbsync_free_env(void) /****************************************************************************** * * - * Function: zbx_dbsync_init * - * * * Purpose: initializes changeset * * * ******************************************************************************/ @@ -321,8 +299,6 @@ void zbx_dbsync_init(zbx_dbsync_t *sync, unsigned char mode) /****************************************************************************** * * - * Function: zbx_dbsync_clear * - * * * Purpose: frees resources allocated by changeset * * * ******************************************************************************/ @@ -365,8 +341,6 @@ void zbx_dbsync_clear(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: zbx_dbsync_next * - * * * Purpose: gets the next row from the changeset * * * * Parameters: sync - [IN] the changeset * @@ -419,8 +393,6 @@ int zbx_dbsync_next(zbx_dbsync_t *sync, zbx_uint64_t *rowid, char ***row, unsign /****************************************************************************** * * - * Function: encode_expression * - * * * Purpose: encode serialized expression to be returned as db field * * * * Parameter: sync - [OUT] the changeset * @@ -444,8 +416,6 @@ static char *encode_expression(const zbx_eval_context_t *ctx) /****************************************************************************** * * - * Function: dbsync_compare_serialized_expression * - * * * Purpose: compare serialized expression * * * * Parameter: col - [IN] the base64 encoded expression * @@ -494,8 +464,6 @@ out: /****************************************************************************** * * - * Function: zbx_dbsync_compare_config * - * * * Purpose: compares config table with cached configuration data * * * * Parameter: sync - [OUT] the changeset * @@ -546,8 +514,6 @@ int zbx_dbsync_compare_config(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: zbx_dbsync_compare_autoreg_psk * - * * * Purpose: compares 'config_autoreg_tls' table with cached configuration * * data * * * @@ -623,8 +589,6 @@ int zbx_dbsync_compare_autoreg_psk(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dbsync_compare_host * - * * * Purpose: compares hosts table row with cached configuration data * * * * Parameter: host - [IN] the cached host * @@ -736,8 +700,6 @@ static int dbsync_compare_host(ZBX_DC_HOST *host, const DB_ROW dbrow) /****************************************************************************** * * - * Function: zbx_dbsync_compare_hosts * - * * * Purpose: compares hosts table with cached configuration data * * and populates the changeset * * * @@ -832,8 +794,6 @@ int zbx_dbsync_compare_hosts(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dbsync_compare_host_inventory * - * * * Purpose: compares host inventory table row with cached configuration data * * * * Parameter: hi - [IN] the cached host inventory data * @@ -861,8 +821,6 @@ static int dbsync_compare_host_inventory(const ZBX_DC_HOST_INVENTORY *hi, const /****************************************************************************** * * - * Function: zbx_dbsync_compare_host_inventory * - * * * Purpose: compares host_inventory table with cached configuration data * * * * Parameter: sync - [OUT] the changeset * @@ -943,8 +901,6 @@ int zbx_dbsync_compare_host_inventory(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: zbx_dbsync_compare_host_templates * - * * * Purpose: compares hosts_templates table with cached configuration data * * * * Parameter: sync - [OUT] the changeset * @@ -1025,8 +981,6 @@ int zbx_dbsync_compare_host_templates(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dbsync_compare_global_macro * - * * * Purpose: compares global macro table row with cached configuration data * * * * Parameter: gmacro - [IN] the cached global macro data * @@ -1076,8 +1030,6 @@ out: /****************************************************************************** * * - * Function: zbx_dbsync_compare_global_macros * - * * * Purpose: compares global macros table with cached configuration data * * * * Parameter: sync - [OUT] the changeset * @@ -1144,8 +1096,6 @@ int zbx_dbsync_compare_global_macros(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dbsync_compare_host_macro * - * * * Purpose: compares host macro table row with cached configuration data * * * * Parameter: hmacro - [IN] the cached host macro data * @@ -1198,8 +1148,6 @@ out: /****************************************************************************** * * - * Function: zbx_dbsync_compare_host_macros * - * * * Purpose: compares global macros table with cached configuration data * * * * Parameter: sync - [OUT] the changeset * @@ -1268,8 +1216,6 @@ int zbx_dbsync_compare_host_macros(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dbsync_compare_interface * - * * * Purpose: compares interface table row with cached configuration data * * * * Parameter: interface - [IN] the cached interface data * @@ -1372,8 +1318,6 @@ static int dbsync_compare_interface(const ZBX_DC_INTERFACE *interface, const DB_ /****************************************************************************** * * - * Function: zbx_dbsync_compare_interfaces * - * * * Purpose: compares interfaces table with cached configuration data * * * * Parameter: sync - [OUT] the changeset * @@ -1444,8 +1388,6 @@ int zbx_dbsync_compare_interfaces(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dbsync_compare_item * - * * * Purpose: compares items table row with cached configuration data * * * * Parameter: item - [IN] the cached item * @@ -1825,8 +1767,6 @@ static int dbsync_compare_item(const ZBX_DC_ITEM *item, const DB_ROW dbrow) /****************************************************************************** * * - * Function: dbsync_item_preproc_row * - * * * Purpose: applies necessary preprocessing before row is compared/used * * * * Parameter: row - [IN] the row to preprocess * @@ -1913,8 +1853,6 @@ static char **dbsync_item_preproc_row(char **row) /****************************************************************************** * * - * Function: zbx_dbsync_compare_items * - * * * Purpose: compares items table with cached configuration data * * * * Return value: SUCCEED - the changeset was successfully calculated * @@ -2006,8 +1944,6 @@ static int dbsync_compare_template_item(const ZBX_DC_TEMPLATE_ITEM *item, const /****************************************************************************** * * - * Function: zbx_dbsync_compare_template_items * - * * * Purpose: compares items that belong to templates with configuration cache * * * * Return value: SUCCEED - the changeset was successfully calculated * @@ -2089,8 +2025,6 @@ static int dbsync_compare_prototype_item(const ZBX_DC_PROTOTYPE_ITEM *item, cons /****************************************************************************** * * - * Function: zbx_dbsync_compare_prototype_items * - * * * Purpose: compares lld item prototypes with configuration cache * * * * Return value: SUCCEED - the changeset was successfully calculated * @@ -2161,8 +2095,6 @@ int zbx_dbsync_compare_prototype_items(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dbsync_compare_trigger * - * * * Purpose: compares triggers table row with cached configuration data * * * * Parameter: trigger - [IN] the cached trigger * @@ -2221,8 +2153,6 @@ static int dbsync_compare_trigger(const ZBX_DC_TRIGGER *trigger, const DB_ROW db /****************************************************************************** * * - * Function: dbsync_trigger_preproc_row * - * * * Purpose: applies necessary preprocessing before row is compared/used * * * * Parameter: row - [IN] the row to preprocess * @@ -2324,8 +2254,6 @@ static char **dbsync_trigger_preproc_row(char **row) /****************************************************************************** * * - * Function: zbx_dbsync_compare_triggers * - * * * Purpose: compares triggers table with cached configuration data * * * * Parameter: sync - [OUT] the changeset * @@ -2411,8 +2339,6 @@ int zbx_dbsync_compare_triggers(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: zbx_dbsync_compare_trigger_dependency * - * * * Purpose: compares trigger_depends table with cached configuration data * * * * Parameter: sync - [OUT] the changeset * @@ -2500,8 +2426,6 @@ int zbx_dbsync_compare_trigger_dependency(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dbsync_compare_function * - * * * Purpose: compares functions table row with cached configuration data * * * * Parameter: function - [IN] the cached function * @@ -2530,8 +2454,6 @@ static int dbsync_compare_function(const ZBX_DC_FUNCTION *function, const DB_ROW /****************************************************************************** * * - * Function: dbsync_function_preproc_row * - * * * Purpose: applies necessary preprocessing before row is compared/used * * * * Parameter: row - [IN] the row to preprocess * @@ -2569,8 +2491,6 @@ static char **dbsync_function_preproc_row(char **row) /****************************************************************************** * * - * Function: zbx_dbsync_compare_functions * - * * * Purpose: compares functions table with cached configuration data * * * * Parameter: sync - [OUT] the changeset * @@ -2647,8 +2567,6 @@ int zbx_dbsync_compare_functions(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dbsync_compare_expression * - * * * Purpose: compares expressions table row with cached configuration data * * * * Parameter: expression - [IN] the cached expression * @@ -2680,8 +2598,6 @@ static int dbsync_compare_expression(const ZBX_DC_EXPRESSION *expression, const /****************************************************************************** * * - * Function: zbx_dbsync_compare_exprssions * - * * * Purpose: compares expressions, regexps tables with cached configuration * * data * * * @@ -2753,8 +2669,6 @@ int zbx_dbsync_compare_expressions(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dbsync_compare_action * - * * * Purpose: compares actions table row with cached configuration data * * * * Parameter: action - [IN] the cached action * @@ -2781,8 +2695,6 @@ static int dbsync_compare_action(const zbx_dc_action_t *action, const DB_ROW dbr /****************************************************************************** * * - * Function: zbx_dbsync_compare_actions * - * * * Purpose: compares actions table with cached configuration data * * * * Parameter: sync - [OUT] the changeset * @@ -2852,8 +2764,6 @@ int zbx_dbsync_compare_actions(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dbsync_compare_action_op * - * * * Purpose: compares action operation class and flushes update row if * * necessary * * * @@ -2884,8 +2794,6 @@ static void dbsync_compare_action_op(zbx_dbsync_t *sync, zbx_uint64_t actionid, /****************************************************************************** * * - * Function: zbx_dbsync_compare_action_ops * - * * * Purpose: compares actions by operation class * * * * Parameter: sync - [OUT] the changeset * @@ -2953,8 +2861,6 @@ int zbx_dbsync_compare_action_ops(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dbsync_compare_action_condition * - * * * Purpose: compares conditions table row with cached configuration data * * * * Parameter: condition - [IN] the cached action condition * @@ -2983,8 +2889,6 @@ static int dbsync_compare_action_condition(const zbx_dc_action_condition_t *cond /****************************************************************************** * * - * Function: zbx_dbsync_compare_action_conditions * - * * * Purpose: compares conditions table with cached configuration data * * * * Parameter: sync - [OUT] the changeset * @@ -3057,8 +2961,6 @@ int zbx_dbsync_compare_action_conditions(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dbsync_compare_trigger_tag * - * * * Purpose: compares trigger tags table row with cached configuration data * * * * Parameter: tag - [IN] the cached trigger tag * @@ -3084,8 +2986,6 @@ static int dbsync_compare_trigger_tag(const zbx_dc_trigger_tag_t *tag, const DB_ /****************************************************************************** * * - * Function: zbx_dbsync_compare_trigger_tags * - * * * Purpose: compares trigger tags table with cached configuration data * * * * Parameter: sync - [OUT] the changeset * @@ -3162,8 +3062,6 @@ int zbx_dbsync_compare_trigger_tags(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dbsync_compare_item_tag * - * * * Purpose: compares item tags table row with cached configuration data * * * * Parameter: tag - [IN] the cached item tag * @@ -3189,8 +3087,6 @@ static int dbsync_compare_item_tag(const zbx_dc_item_tag_t *tag, const DB_ROW db /****************************************************************************** * * - * Function: zbx_dbsync_compare_item_tags * - * * * Purpose: compares item tags table with cached configuration data * * * * Parameter: sync - [OUT] the changeset * @@ -3266,8 +3162,6 @@ int zbx_dbsync_compare_item_tags(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dbsync_compare_host_tag * - * * * Purpose: compares host tags table row with cached configuration data * * * * Parameter: tag - [IN] the cached host tag * @@ -3293,8 +3187,6 @@ static int dbsync_compare_host_tag(const zbx_dc_host_tag_t *tag, const DB_ROW db /****************************************************************************** * * - * Function: zbx_dbsync_compare_host_tags * - * * * Purpose: compares host tags table with cached configuration data * * * * Parameter: sync - [OUT] the changeset * @@ -3364,8 +3256,6 @@ int zbx_dbsync_compare_host_tags(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dbsync_compare_correlation * - * * * Purpose: compares correlation table row with cached configuration data * * * * Parameter: correlation - [IN] the cached correlation rule * @@ -3391,8 +3281,6 @@ static int dbsync_compare_correlation(const zbx_dc_correlation_t *correlation, c /****************************************************************************** * * - * Function: zbx_dbsync_compare_correlations * - * * * Purpose: compares correlation table with cached configuration data * * * * Parameter: sync - [OUT] the changeset * @@ -3464,8 +3352,6 @@ int zbx_dbsync_compare_correlations(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dbsync_compare_corr_condition * - * * * Purpose: compares correlation condition tables dbrow with cached * * configuration data * * * @@ -3520,8 +3406,6 @@ static int dbsync_compare_corr_condition(const zbx_dc_corr_condition_t *corr_con /****************************************************************************** * * - * Function: zbx_dbsync_compare_corr_conditions * - * * * Purpose: compares correlation condition tables with cached configuration * * data * * * @@ -3604,8 +3488,6 @@ int zbx_dbsync_compare_corr_conditions(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dbsync_compare_corr_operation * - * * * Purpose: compares correlation operation tables dbrow with cached * * configuration data * * * @@ -3629,8 +3511,6 @@ static int dbsync_compare_corr_operation(const zbx_dc_corr_operation_t *corr_ope /****************************************************************************** * * - * Function: zbx_dbsync_compare_corr_operations * - * * * Purpose: compares correlation operation tables with cached configuration * * data * * * @@ -3704,8 +3584,6 @@ int zbx_dbsync_compare_corr_operations(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dbsync_compare_host_group * - * * * Purpose: compares host group table row with cached configuration data * * * * Parameter: group - [IN] the cached host group * @@ -3725,8 +3603,6 @@ static int dbsync_compare_host_group(const zbx_dc_hostgroup_t *group, const DB_R /****************************************************************************** * * - * Function: zbx_dbsync_compare_host_groups * - * * * Purpose: compares host groups table with cached configuration data * * * * Parameter: sync - [OUT] the changeset * @@ -3789,8 +3665,6 @@ int zbx_dbsync_compare_host_groups(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dbsync_item_pp_preproc_row * - * * * Purpose: applies necessary preprocessing before row is compared/used * * * * Parameter: row - [IN] the row to preprocess * @@ -3834,8 +3708,6 @@ static char **dbsync_item_pp_preproc_row(char **row) /****************************************************************************** * * - * Function: dbsync_compare_item_preproc * - * * * Purpose: compares item preproc table row with cached configuration data * * * * Parameter: preproc - [IN] the cached item preprocessing operation * @@ -3870,8 +3742,6 @@ static int dbsync_compare_item_preproc(const zbx_dc_preproc_op_t *preproc, const /****************************************************************************** * * - * Function: zbx_dbsync_compare_item_preprocessing * - * * * Purpose: compares item preproc tables with cached configuration data * * * * Parameter: sync - [OUT] the changeset * @@ -3967,8 +3837,6 @@ int zbx_dbsync_compare_item_preprocs(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dbsync_compare_maintenance * - * * * Purpose: compares maintenance table row with cached configuration data * * * * Parameter: maintenance - [IN] the cached maintenance data * @@ -3997,8 +3865,6 @@ static int dbsync_compare_maintenance(const zbx_dc_maintenance_t *maintenance, c /****************************************************************************** * * - * Function: dbsync_compare_itemscript_param * - * * * Purpose: compares item script params table row with cached configuration * * data * * * @@ -4025,8 +3891,6 @@ static int dbsync_compare_itemscript_param(const zbx_dc_scriptitem_param_t *scri /****************************************************************************** * * - * Function: zbx_dbsync_compare_item_script_param * - * * * Purpose: compares item_parameter table with cached configuration data * * * * Parameter: sync - [OUT] the changeset * @@ -4109,8 +3973,6 @@ int zbx_dbsync_compare_item_script_param(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: zbx_dbsync_compare_maintenances * - * * * Purpose: compares maintenances table with cached configuration data * * * * Parameter: sync - [OUT] the changeset * @@ -4178,8 +4040,6 @@ int zbx_dbsync_compare_maintenances(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dbsync_compare_maintenance_tag * - * * * Purpose: compares maintenance_tag table row with cached configuration data * * * * Parameter: maintenance_tag - [IN] the cached maintenance tag * @@ -4205,8 +4065,6 @@ static int dbsync_compare_maintenance_tag(const zbx_dc_maintenance_tag_t *mainte /****************************************************************************** * * - * Function: zbx_dbsync_compare_maintenance_tags * - * * * Purpose: compares maintenances table with cached configuration data * * * * Parameter: sync - [OUT] the changeset * @@ -4275,8 +4133,6 @@ int zbx_dbsync_compare_maintenance_tags(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: dbsync_compare_maintenance_period * - * * * Purpose: compares maintenance_period table row with cached configuration * * dat * * * @@ -4318,8 +4174,6 @@ static int dbsync_compare_maintenance_period(const zbx_dc_maintenance_period_t * /****************************************************************************** * * - * Function: zbx_dbsync_compare_maintenance_periods * - * * * Purpose: compares timeperiods table with cached configuration data * * * * Parameter: sync - [OUT] the changeset * @@ -4390,8 +4244,6 @@ int zbx_dbsync_compare_maintenance_periods(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: zbx_dbsync_compare_maintenance_groups * - * * * Purpose: compares maintenances_groups table with cached configuration data * * * * Parameter: sync - [OUT] the changeset * @@ -4467,8 +4319,6 @@ int zbx_dbsync_compare_maintenance_groups(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: zbx_dbsync_compare_maintenance_hosts * - * * * Purpose: compares maintenances_hosts table with cached configuration data * * * * Parameter: sync - [OUT] the changeset * @@ -4544,8 +4394,6 @@ int zbx_dbsync_compare_maintenance_hosts(zbx_dbsync_t *sync) /****************************************************************************** * * - * Function: zbx_dbsync_compare_host_group_hosts * - * * * Purpose: compares hosts_groups table with cached configuration data * * * * Parameter: sync - [OUT] the changeset * diff --git a/src/libs/zbxdbcache/dbsync.h b/src/libs/zbxdbcache/dbsync.h index 54898b37697..91fa9948804 100644 --- a/src/libs/zbxdbcache/dbsync.h +++ b/src/libs/zbxdbcache/dbsync.h @@ -49,8 +49,6 @@ /****************************************************************************** * * - * Function: zbx_dbsync_preproc_row_func_t * - * * * Purpose: applies necessary preprocessing before row is compared/used * * * * Parameter: row - [IN] the row to preprocess * diff --git a/src/libs/zbxdbcache/valuecache.c b/src/libs/zbxdbcache/valuecache.c index 9750205928f..5bb34ee05d7 100644 --- a/src/libs/zbxdbcache/valuecache.c +++ b/src/libs/zbxdbcache/valuecache.c @@ -293,8 +293,6 @@ static void vch_item_clean_cache(zbx_vc_item_t *item); /********************************************************************************* * * - * Function: vc_db_read_values_by_time * - * * * Purpose: reads item history data from database * * * * Parameters: itemid - [IN] the itemid * @@ -322,8 +320,6 @@ static int vc_db_read_values_by_time(zbx_uint64_t itemid, int value_type, zbx_ve /************************************************************************************ * * - * Function: vc_db_read_values_by_time_and_count * - * * * Purpose: reads item history data from database * * * * Parameters: itemid - [IN] the itemid * @@ -442,8 +438,6 @@ static int vc_db_read_values_by_time_and_count(zbx_uint64_t itemid, int value_ty /****************************************************************************** * * - * Function: vc_db_get_values * - * * * Purpose: get item history data for the specified time period directly from * * database * * * @@ -561,8 +555,6 @@ static int vc_strpool_compare_func(const void *d1, const void *d2) /****************************************************************************** * * - * Function: vc_item_weight_compare_func * - * * * Purpose: compares two item weight data structures by their 'weight' * * * * Parameters: d1 - [IN] the first item weight data structure * @@ -578,8 +570,6 @@ static int vc_item_weight_compare_func(const zbx_vc_item_weight_t *d1, const zbx /****************************************************************************** * * - * Function: vc_history_logfree * - * * * Purpose: frees history log and all resources allocated for it * * * * Parameters: log - [IN] the history log to free * @@ -594,8 +584,6 @@ static void vc_history_logfree(zbx_log_value_t *log) /****************************************************************************** * * - * Function: vc_history_logdup * - * * * Purpose: duplicates history log by allocating necessary resources and * * copying the target log values. * * * @@ -621,8 +609,6 @@ static zbx_log_value_t *vc_history_logdup(const zbx_log_value_t *log) /****************************************************************************** * * - * Function: vc_history_record_vector_clean * - * * * Purpose: releases resources allocated to store history records * * * * Parameters: vector - [IN] the history record vector * @@ -651,8 +637,6 @@ static void vc_history_record_vector_clean(zbx_vector_history_record_t *vector, /****************************************************************************** * * - * Function: vc_update_statistics * - * * * Purpose: updates cache and item statistics * * * * Parameters: item - [IN] the item (optional) * @@ -693,8 +677,6 @@ static void vc_update_statistics(zbx_vc_item_t *item, int hits, int misses, int /****************************************************************************** * * - * Function: vc_compare_items_by_total_values * - * * * Purpose: is used to sort items by value count in descending order * * * ******************************************************************************/ @@ -710,8 +692,6 @@ static int vc_compare_items_by_total_values(const void *d1, const void *d2) /****************************************************************************** * * - * Function: vc_dump_items_statistics * - * * * Purpose: find out items responsible for low memory * * * ******************************************************************************/ @@ -752,8 +732,6 @@ static void vc_dump_items_statistics(void) /****************************************************************************** * * - * Function: vc_warn_low_memory * - * * * Purpose: logs low memory warning * * * * Comments: The low memory warning is written to log every 5 minutes when * @@ -786,8 +764,6 @@ static void vc_warn_low_memory(void) /****************************************************************************** * * - * Function: vc_release_unused_items * - * * * Purpose: frees space in cache by dropping items not accessed for more than * * 24 hours * * * @@ -825,8 +801,6 @@ static size_t vc_release_unused_items(const zbx_vc_item_t *source_item) /****************************************************************************** * * - * Function: zbx_vc_housekeeping_value_cache * - * * * Purpose: release unused items from value cache * * * * Comments: If unused items are not cleared from value cache periodically * @@ -846,8 +820,6 @@ void zbx_vc_housekeeping_value_cache(void) /****************************************************************************** * * - * Function: vc_release_space * - * * * Purpose: frees space in cache to store the specified number of bytes by * * dropping the least accessed items * * * @@ -917,8 +889,6 @@ static void vc_release_space(zbx_vc_item_t *source_item, size_t space) /****************************************************************************** * * - * Function: vc_history_record_copy * - * * * Purpose: copies history value * * * * Parameters: dst - [OUT] a pointer to the destination value * @@ -949,8 +919,6 @@ static void vc_history_record_copy(zbx_history_record_t *dst, const zbx_history_ /****************************************************************************** * * - * Function: vc_history_record_vector_append * - * * * Purpose: appends the specified value to value vector * * * * Parameters: vector - [IN/OUT] the value vector * @@ -972,8 +940,6 @@ static void vc_history_record_vector_append(zbx_vector_history_record_t *vector, /****************************************************************************** * * - * Function: vc_item_malloc * - * * * Purpose: allocate cache memory to store item's resources * * * * Parameters: item - [IN] the item * @@ -1005,8 +971,6 @@ static void *vc_item_malloc(zbx_vc_item_t *item, size_t size) /****************************************************************************** * * - * Function: vc_item_strdup * - * * * Purpose: copies string to the cache memory * * * * Parameters: item - [IN] the item * @@ -1058,8 +1022,6 @@ static char *vc_item_strdup(zbx_vc_item_t *item, const char *str) /****************************************************************************** * * - * Function: vc_item_strfree * - * * * Purpose: removes string from cache string pool * * * * Parameters: str - [IN] the string to remove * @@ -1093,8 +1055,6 @@ static size_t vc_item_strfree(char *str) /****************************************************************************** * * - * Function: vc_item_logdup * - * * * Purpose: copies log value to the cache memory * * * * Parameters: item - [IN] the item * @@ -1142,8 +1102,6 @@ fail: /****************************************************************************** * * - * Function: vc_item_logfree * - * * * Purpose: removes log resource from cache memory * * * * Parameters: str - [IN] the log to remove * @@ -1172,8 +1130,6 @@ static size_t vc_item_logfree(zbx_log_value_t *log) /****************************************************************************** * * - * Function: vc_item_free_values * - * * * Purpose: frees cache resources of the specified item value range * * * * Parameters: item - [IN] the item * @@ -1209,8 +1165,6 @@ static size_t vc_item_free_values(zbx_vc_item_t *item, zbx_history_record_t *val /****************************************************************************** * * - * Function: vc_remove_item * - * * * Purpose: removes item from cache and frees resources allocated for it * * * * Parameters: item - [IN] the item * @@ -1224,8 +1178,6 @@ static void vc_remove_item(zbx_vc_item_t *item) /****************************************************************************** * * - * Function: vc_remove_item_by_id * - * * * Purpose: removes item from cache and frees resources allocated for it * * * * Parameters: itemid - [IN] the item identifier * @@ -1243,8 +1195,6 @@ static void vc_remove_item_by_id(zbx_uint64_t itemid) } /****************************************************************************** * * - * Function: vc_item_update_db_cached_from * - * * * Purpose: updates the timestamp from which the item is being cached * * * * Parameters: item - [IN] the item * @@ -1301,8 +1251,6 @@ static void vc_item_update_db_cached_from(zbx_vc_item_t *item, int timestamp) /****************************************************************************** * * - * Function: vch_item_update_range * - * * * Purpose: updates item range with current request range * * * * Parameters: item - [IN] the item * @@ -1335,8 +1283,6 @@ static void vch_item_update_range(zbx_vc_item_t *item, int range, int now) /****************************************************************************** * * - * Function: vch_item_chunk_slot_count * - * * * Purpose: calculates optimal number of slots for an item data chunk * * * * Parameters: item - [IN] the item * @@ -1372,8 +1318,6 @@ static int vch_item_chunk_slot_count(zbx_vc_item_t *item, int values_new) /****************************************************************************** * * - * Function: vch_item_add_chunk * - * * * Purpose: adds a new data chunk at the end of item's history data list * * * * Parameters: item - [IN/OUT] the item to add chunk to * @@ -1429,8 +1373,6 @@ static int vch_item_add_chunk(zbx_vc_item_t *item, int nslots, zbx_vc_chunk_t *i /****************************************************************************** * * - * Function: vch_chunk_find_last_value_before * - * * * Purpose: find the index of the last value in chunk with timestamp less or * * equal to the specified timestamp. * * * @@ -1480,8 +1422,6 @@ static int vch_chunk_find_last_value_before(const zbx_vc_chunk_t *chunk, const z /****************************************************************************** * * - * Function: vch_item_get_last_value * - * * * Purpose: gets the chunk and index of the last value with a timestamp less * * or equal to the specified timestamp * * * @@ -1530,8 +1470,6 @@ static int vch_item_get_last_value(const zbx_vc_item_t *item, const zbx_timespec /****************************************************************************** * * - * Function: vch_item_copy_value * - * * * Purpose: copies value in the specified item's chunk slot * * * * Parameters: chunk - [IN/OUT] the target chunk * @@ -1577,8 +1515,6 @@ out: /****************************************************************************** * * - * Function: vch_item_copy_values_at_tail * - * * * Purpose: copies values at the beginning of item tail chunk * * * * Parameters: item - [IN/OUT] the target item * @@ -1642,8 +1578,6 @@ out: /****************************************************************************** * * - * Function: vch_item_free_chunk * - * * * Purpose: frees chunk and all resources allocated to store its values * * * * Parameters: item - [IN] the chunk owner item * @@ -1666,8 +1600,6 @@ static size_t vch_item_free_chunk(zbx_vc_item_t *item, zbx_vc_chunk_t *chunk) /****************************************************************************** * * - * Function: vch_item_remove_chunk * - * * * Purpose: removes item history data chunk * * * * Parameters: item - [IN ] the chunk owner item * @@ -1693,8 +1625,6 @@ static void vch_item_remove_chunk(zbx_vc_item_t *item, zbx_vc_chunk_t *chunk) /****************************************************************************** * * - * Function: vch_item_clean_cache * - * * * Purpose: removes item history data that are outside (older) the maximum * * request range * * * @@ -1756,8 +1686,6 @@ static void vch_item_clean_cache(zbx_vc_item_t *item) /****************************************************************************** * * - * Function: vch_item_remove_values * - * * * Purpose: removes item history data that are older than the specified * * timestamp * * * @@ -1800,8 +1728,6 @@ static void vch_item_remove_values(zbx_vc_item_t *item, int timestamp) /****************************************************************************** * * - * Function: vch_item_add_value_at_head * - * * * Purpose: adds one item history value at the end of current item's history * * data * * * @@ -1912,8 +1838,6 @@ out: /****************************************************************************** * * - * Function: vch_item_add_values_at_tail * - * * * Purpose: adds item history values at the beginning of current item's * * history data * * * @@ -1976,8 +1900,6 @@ out: /****************************************************************************** * * - * Function: vch_item_cache_values_by_time * - * * * Purpose: cache item history data for the specified time period * * * * Parameters: item - [IN] the item * @@ -2062,8 +1984,6 @@ out: /****************************************************************************** * * - * Function: vch_item_cache_values_by_time_and_count * - * * * Purpose: cache the specified number of history data values for time period * * since timestamp * * * @@ -2184,8 +2104,6 @@ out: /****************************************************************************** * * - * Function: vch_item_get_values_by_time * - * * * Purpose: retrieves item history data from cache * * * * Parameters: item - [IN] the item * @@ -2234,8 +2152,6 @@ static void vch_item_get_values_by_time(const zbx_vc_item_t *item, zbx_vector_hi /****************************************************************************** * * - * Function: vch_item_get_values_by_time_and_count * - * * * Purpose: retrieves item history data from cache * * * * Parameters: item - [IN] the item * @@ -2314,8 +2230,6 @@ out: /****************************************************************************** * * - * Function: vch_item_get_value_range * - * * * Purpose: get item values for the specified range * * * * Parameters: item - [IN] the item * @@ -2389,8 +2303,6 @@ out: /****************************************************************************** * * - * Function: vch_item_free_cache * - * * * Purpose: frees resources allocated for item history data * * * * Parameters: item - [IN] the item * @@ -2426,8 +2338,6 @@ static size_t vch_item_free_cache(zbx_vc_item_t *item) /****************************************************************************** * * - * Function: zbx_vc_init * - * * * Purpose: initializes value cache * * * ******************************************************************************/ @@ -2499,8 +2409,6 @@ out: /****************************************************************************** * * - * Function: zbx_vc_destroy * - * * * Purpose: destroys value cache * * * ******************************************************************************/ @@ -2528,8 +2436,6 @@ void zbx_vc_destroy(void) /****************************************************************************** * * - * Function: zbx_vc_reset * - * * * Purpose: resets value cache * * * * Comments: All items and their historical data are removed, * @@ -2569,8 +2475,6 @@ void zbx_vc_reset(void) /****************************************************************************** * * - * Function: zbx_vc_add_values * - * * * Purpose: adds item values to the history and value cache * * * * Parameters: history - [IN] item history values * @@ -2632,8 +2536,6 @@ int zbx_vc_add_values(zbx_vector_ptr_t *history, int *ret_flush) /****************************************************************************** * * - * Function: zbx_vc_get_values * - * * * Purpose: get item history data for the specified time period * * * * Parameters: itemid - [IN] the item id * @@ -2712,8 +2614,6 @@ out: /****************************************************************************** * * - * Function: zbx_vc_get_value * - * * * Purpose: get the last history value with a timestamp less or equal to the * * target timestamp * * * @@ -2754,8 +2654,6 @@ out: /****************************************************************************** * * - * Function: zbx_vc_get_statistics * - * * * Purpose: retrieves usage cache statistics * * * * Parameters: stats - [OUT] the cache usage statistics * @@ -2786,8 +2684,6 @@ int zbx_vc_get_statistics(zbx_vc_stats_t *stats) /****************************************************************************** * * - * Function: zbx_vc_enable * - * * * Purpose: enables value caching for current process * * * ******************************************************************************/ @@ -2799,8 +2695,6 @@ void zbx_vc_enable(void) /****************************************************************************** * * - * Function: zbx_vc_disable * - * * * Purpose: disables value caching for current process * * * ******************************************************************************/ @@ -2811,8 +2705,6 @@ void zbx_vc_disable(void) /****************************************************************************** * * - * Function: zbx_hc_get_diag_stats * - * * * Purpose: get value cache diagnostic statistics * * * ******************************************************************************/ @@ -2844,8 +2736,6 @@ void zbx_vc_get_diag_stats(zbx_uint64_t *items_num, zbx_uint64_t *values_num, in /****************************************************************************** * * - * Function: zbx_hc_get_mem_stats * - * * * Purpose: get value cache shared memory statistics * * * ******************************************************************************/ @@ -2864,8 +2754,6 @@ void zbx_vc_get_mem_stats(zbx_mem_stats_t *mem) /****************************************************************************** * * - * Function: zbx_vc_get_item_stats * - * * * Purpose: get statistics of cached items * * * ******************************************************************************/ @@ -2897,8 +2785,6 @@ void zbx_vc_get_item_stats(zbx_vector_ptr_t *stats) /****************************************************************************** * * - * Function: zbx_vc_flush_stats * - * * * Purpose: flush locally cached statistics * * * ******************************************************************************/ diff --git a/src/libs/zbxdbhigh/db.c b/src/libs/zbxdbhigh/db.c index a0246dd1623..b49c5a57d9f 100644 --- a/src/libs/zbxdbhigh/db.c +++ b/src/libs/zbxdbhigh/db.c @@ -157,8 +157,6 @@ void zbx_db_validate_config(void) /****************************************************************************** * * - * Function: DBinit_autoincrement_options * - * * * Purpose: specify the autoincrement options when connecting to the database * * * ******************************************************************************/ @@ -169,8 +167,6 @@ void DBinit_autoincrement_options(void) /****************************************************************************** * * - * Function: DBconnect * - * * * Purpose: connect to the database * * * * Parameters: flag - ZBX_DB_CONNECT_ONCE (try once and return the result), * @@ -218,8 +214,6 @@ int DBconnect(int flag) /****************************************************************************** * * - * Function: DBinit * - * * * Author: Alexander Vladishev * * * ******************************************************************************/ @@ -235,8 +229,6 @@ void DBdeinit(void) /****************************************************************************** * * - * Function: DBtxn_operation * - * * * Purpose: helper function to loop transaction operation while DB is down * * * * Author: Eugene Grigorjev, Vladimir Levijev * @@ -264,8 +256,6 @@ static void DBtxn_operation(int (*txn_operation)(void)) /****************************************************************************** * * - * Function: DBbegin * - * * * Purpose: start a transaction * * * * Author: Eugene Grigorjev, Vladimir Levijev * @@ -280,8 +270,6 @@ void DBbegin(void) /****************************************************************************** * * - * Function: DBcommit * - * * * Purpose: commit a transaction * * * * Author: Eugene Grigorjev, Vladimir Levijev * @@ -302,8 +290,6 @@ int DBcommit(void) /****************************************************************************** * * - * Function: DBrollback * - * * * Purpose: rollback a transaction * * * * Author: Eugene Grigorjev, Vladimir Levijev * @@ -324,8 +310,6 @@ void DBrollback(void) /****************************************************************************** * * - * Function: DBend * - * * * Purpose: commit or rollback a transaction depending on a parameter value * * * * Comments: do nothing if DB does not support transactions * @@ -344,8 +328,6 @@ int DBend(int ret) #ifdef HAVE_ORACLE /****************************************************************************** * * - * Function: DBstatement_prepare * - * * * Purpose: prepares a SQL statement for execution * * * * Comments: retry until DB is up * @@ -374,8 +356,6 @@ void DBstatement_prepare(const char *sql) /****************************************************************************** * * - * Function: __zbx_DBexecute * - * * * Purpose: execute a non-select statement * * * * Comments: retry until DB is up * @@ -410,8 +390,6 @@ int DBexecute(const char *fmt, ...) /****************************************************************************** * * - * Function: __zbx_DBexecute_once * - * * * Purpose: execute a non-select statement * * * * Comments: don't retry if DB is down * @@ -433,8 +411,6 @@ int DBexecute_once(const char *fmt, ...) /****************************************************************************** * * - * Function: DBis_null * - * * * Purpose: check if numeric field value is null * * * * Parameters: field - [IN] field value to be checked * @@ -459,8 +435,6 @@ DB_ROW DBfetch(DB_RESULT result) /****************************************************************************** * * - * Function: DBselect_once * - * * * Purpose: execute a select statement * * * ******************************************************************************/ @@ -480,8 +454,6 @@ DB_RESULT DBselect_once(const char *fmt, ...) /****************************************************************************** * * - * Function: DBselect * - * * * Purpose: execute a select statement * * * * Comments: retry until DB is up * @@ -516,8 +488,6 @@ DB_RESULT DBselect(const char *fmt, ...) /****************************************************************************** * * - * Function: DBselectN * - * * * Purpose: execute a select statement and get the first N entries * * * * Comments: retry until DB is up * @@ -632,8 +602,6 @@ static size_t get_string_field_size(unsigned char type) /****************************************************************************** * * - * Function: DBdyn_escape_string_len * - * * ******************************************************************************/ char *DBdyn_escape_string_len(const char *src, size_t length) { @@ -642,8 +610,6 @@ char *DBdyn_escape_string_len(const char *src, size_t length) /****************************************************************************** * * - * Function: DBdyn_escape_string * - * * ******************************************************************************/ char *DBdyn_escape_string(const char *src) { @@ -652,8 +618,6 @@ char *DBdyn_escape_string(const char *src) /****************************************************************************** * * - * Function: DBdyn_escape_field_len * - * * ******************************************************************************/ static char *DBdyn_escape_field_len(const ZBX_FIELD *field, const char *src, zbx_escape_sequence_t flag) { @@ -675,8 +639,6 @@ static char *DBdyn_escape_field_len(const ZBX_FIELD *field, const char *src, zbx /****************************************************************************** * * - * Function: DBdyn_escape_field * - * * ******************************************************************************/ char *DBdyn_escape_field(const char *table_name, const char *field_name, const char *src) { @@ -694,8 +656,6 @@ char *DBdyn_escape_field(const char *table_name, const char *field_name, const c /****************************************************************************** * * - * Function: DBdyn_escape_like_pattern * - * * ******************************************************************************/ char *DBdyn_escape_like_pattern(const char *src) { @@ -730,8 +690,6 @@ const ZBX_FIELD *DBget_field(const ZBX_TABLE *table, const char *fieldname) /****************************************************************************** * * - * Function: DBget_nextid * - * * * Purpose: gets a new identifier(s) for a specified table * * * * Parameters: tablename - [IN] the name of a table * @@ -865,8 +823,6 @@ zbx_uint64_t DBget_maxid_num(const char *tablename, int num) /****************************************************************************** * * - * Function: DBextract_version_info * - * * * Purpose: connects to DB and tries to detect DB version * * * ******************************************************************************/ @@ -879,8 +835,6 @@ void DBextract_version_info(struct zbx_db_version_info_t *version_info) /****************************************************************************** * * - * Function: DBflush_version_requirements * - * * * Purpose: writes a json entry in DB with the result for the front-end * * * * Parameters: version - [IN] entry of DB versions * @@ -898,8 +852,6 @@ void DBflush_version_requirements(const char *version) /****************************************************************************** * * - * Function: DBcheck_capabilities * - * * * Purpose: checks DBMS for optional features and exit if is not suitable * * * * Parameters: db_version - [IN] version of DB * @@ -976,8 +928,6 @@ out: /****************************************************************************** * * - * Function: DBadd_condition_alloc_btw * - * * * Purpose: Takes an initial part of SQL query and appends a generated * * WHERE condition. The WHERE condition is generated from the given * * list of values as a mix of <fieldname> BETWEEN <id1> AND <idN>" * @@ -1060,8 +1010,6 @@ static void DBadd_condition_alloc_btw(char **sql, size_t *sql_alloc, size_t *sql /****************************************************************************** * * - * Function: DBadd_condition_alloc * - * * * Purpose: Takes an initial part of SQL query and appends a generated * * WHERE condition. The WHERE condition is generated from the given * * list of values as a mix of <fieldname> BETWEEN <id1> AND <idN>" * @@ -1205,8 +1153,6 @@ void DBadd_condition_alloc(char **sql, size_t *sql_alloc, size_t *sql_offset, co /****************************************************************************** * * - * Function: DBadd_str_condition_alloc * - * * * Purpose: This function is similar to DBadd_condition_alloc(), except it is * * designed for generating WHERE conditions for strings. Hence, this * * function is simpler, because only IN condition is possible. * @@ -1313,8 +1259,6 @@ static char buf_string[640]; /****************************************************************************** * * - * Function: zbx_host_string * - * * * Return value: <host> or "???" if host not found * * * * Author: Alexander Vladishev * @@ -1343,8 +1287,6 @@ const char *zbx_host_string(zbx_uint64_t hostid) /****************************************************************************** * * - * Function: zbx_host_key_string * - * * * Return value: <host>:<key> or "???" if item not found * * * * Author: Alexander Vladishev * @@ -1374,8 +1316,6 @@ const char *zbx_host_key_string(zbx_uint64_t itemid) /****************************************************************************** * * - * Function: zbx_check_user_permissions * - * * * Purpose: check if user has access rights to information - full name, * * alias, Email, SMS, etc * * * @@ -1443,8 +1383,6 @@ out: /****************************************************************************** * * - * Function: zbx_user_string * - * * * Return value: "Name Surname (Alias)" or "unknown" if user not found * * * * Author: Alexander Vladishev * @@ -1469,8 +1407,6 @@ const char *zbx_user_string(zbx_uint64_t userid) /****************************************************************************** * * - * Function: DBget_user_names * - * * * Purpose: get user username, name and surname * * * * Parameters: userid - [IN] user id * @@ -1511,8 +1447,6 @@ out: /****************************************************************************** * * - * Function: DBsql_id_cmp * - * * * Purpose: construct where condition * * * * Return value: "=<id>" if id not equal zero, * @@ -1538,8 +1472,6 @@ const char *DBsql_id_cmp(zbx_uint64_t id) /****************************************************************************** * * - * Function: DBregister_host * - * * * Purpose: register unknown host and generate event * * * * Parameters: host - host name * @@ -1883,8 +1815,6 @@ void DBregister_host_clean(zbx_vector_ptr_t *autoreg_hosts) /****************************************************************************** * * - * Function: DBproxy_register_host * - * * * Purpose: register unknown host * * * * Parameters: host - host name * @@ -1917,8 +1847,6 @@ void DBproxy_register_host(const char *host, const char *ip, const char *dns, un /****************************************************************************** * * - * Function: DBexecute_overflowed_sql * - * * * Purpose: execute a set of SQL statements IF it is big enough * * * * Author: Dmitry Borovikov * @@ -1966,8 +1894,6 @@ int DBexecute_overflowed_sql(char **sql, size_t *sql_alloc, size_t *sql_offset) /****************************************************************************** * * - * Function: DBget_unique_hostname_by_sample * - * * * Purpose: construct a unique host name by the given sample * * * * Parameters: host_name_sample - a host name to start constructing from * @@ -2068,8 +1994,6 @@ clean: /****************************************************************************** * * - * Function: DBsql_id_ins * - * * * Purpose: construct insert statement * * * * Return value: "<id>" if id not equal zero, * @@ -2096,8 +2020,6 @@ const char *DBsql_id_ins(zbx_uint64_t id) /****************************************************************************** * * - * Function: DBget_inventory_field * - * * * Purpose: get corresponding host_inventory field name * * * * Parameters: inventory_link - [IN] field link 1..HOST_INVENTORY_FIELD_COUNT * @@ -2351,8 +2273,6 @@ int DBpk_exists(const char *table_name) /****************************************************************************** * * - * Function: DBselect_uint64 * - * * * Parameters: sql - [IN] sql statement * * ids - [OUT] sorted list of selected uint64 values * * * @@ -2681,8 +2601,6 @@ out: #ifdef HAVE_ORACLE /****************************************************************************** * * - * Function: zbx_db_format_values * - * * * Purpose: format bulk operation (insert, update) value list * * * * Parameters: fields - [IN] the field list * @@ -2740,8 +2658,6 @@ static char *zbx_db_format_values(ZBX_FIELD **fields, const zbx_db_value_t *valu /****************************************************************************** * * - * Function: zbx_db_insert_clean * - * * * Purpose: releases resources allocated by bulk insert operations * * * * Parameters: self - [IN] the bulk insert data * @@ -2780,8 +2696,6 @@ void zbx_db_insert_clean(zbx_db_insert_t *self) /****************************************************************************** * * - * Function: zbx_db_insert_prepare_dyn * - * * * Purpose: prepare for database bulk insert operation * * * * Parameters: self - [IN] the bulk insert data * @@ -2826,8 +2740,6 @@ void zbx_db_insert_prepare_dyn(zbx_db_insert_t *self, const ZBX_TABLE *table, co /****************************************************************************** * * - * Function: zbx_db_insert_prepare * - * * * Purpose: prepare for database bulk insert operation * * * * Parameters: self - [IN] the bulk insert data * @@ -2879,8 +2791,6 @@ void zbx_db_insert_prepare(zbx_db_insert_t *self, const char *table, ...) /****************************************************************************** * * - * Function: zbx_db_insert_add_values_dyn * - * * * Purpose: adds row values for database bulk insert operation * * * * Parameters: self - [IN] the bulk insert data * @@ -2933,8 +2843,6 @@ void zbx_db_insert_add_values_dyn(zbx_db_insert_t *self, const zbx_db_value_t ** /****************************************************************************** * * - * Function: zbx_db_insert_add_values * - * * * Purpose: adds row values for database bulk insert operation * * * * Parameters: self - [IN] the bulk insert data * @@ -3001,8 +2909,6 @@ void zbx_db_insert_add_values(zbx_db_insert_t *self, ...) /****************************************************************************** * * - * Function: zbx_db_insert_execute * - * * * Purpose: executes the prepared database bulk insert operation * * * * Parameters: self - [IN] the bulk insert data * @@ -3250,8 +3156,6 @@ out: /****************************************************************************** * * - * Function: zbx_db_insert_autoincrement * - * * * Purpose: executes the prepared database bulk insert operation * * * * Parameters: self - [IN] the bulk insert data * @@ -3278,8 +3182,6 @@ void zbx_db_insert_autoincrement(zbx_db_insert_t *self, const char *field_name) /****************************************************************************** * * - * Function: zbx_db_get_database_type * - * * * Purpose: determine is it a server or a proxy database * * * * Return value: ZBX_DB_SERVER - server database * @@ -3338,8 +3240,6 @@ out: /****************************************************************************** * * - * Function: DBlock_record * - * * * Purpose: locks a record in a table by its primary key and an optional * * constraint field * * * @@ -3389,8 +3289,6 @@ int DBlock_record(const char *table, zbx_uint64_t id, const char *add_field, zbx /****************************************************************************** * * - * Function: DBlock_records * - * * * Purpose: locks a records in a table by its primary key * * * * Parameters: table - [IN] the target table * @@ -3438,8 +3336,6 @@ int DBlock_records(const char *table, const zbx_vector_uint64_t *ids) /****************************************************************************** * * - * Function: DBlock_ids * - * * * Purpose: locks a records in a table by field name * * * * Parameters: table - [IN] the target table * @@ -3487,8 +3383,6 @@ int DBlock_ids(const char *table_name, const char *field_name, zbx_vector_uint64 /****************************************************************************** * * - * Function: zbx_sql_add_interface_availability * - * * * Purpose: adds interface availability update to sql statement * * * * Parameters: ia [IN] the interface availability data * @@ -3544,8 +3438,6 @@ static int zbx_sql_add_interface_availability(const zbx_interface_availability_t /****************************************************************************** * * - * Function: zbx_db_update_interface_availabilities * - * * * Purpose: sync interface availabilities updates into database * * * * Parameters: interface_availabilities [IN] the interface availability data * @@ -3593,8 +3485,6 @@ void zbx_db_update_interface_availabilities(const zbx_vector_availability_ptr_t /****************************************************************************** * * - * Function: DBget_user_by_active_session * - * * * Purpose: validate that session is active and get associated user data * * * * Parameters: sessionid - [IN] the session id to validate * @@ -3647,8 +3537,6 @@ out: /****************************************************************************** * * - * Function: DBget_user_by_auth_token * - * * * Purpose: validate that token is not expired and is active and then get * * associated user data * * * @@ -3718,8 +3606,6 @@ void zbx_user_free(zbx_user_t *user) /****************************************************************************** * * - * Function: zbx_db_mock_field_init * - * * * Purpose: initializes mock field * * * * Parameters: field - [OUT] the field data * @@ -3750,8 +3636,6 @@ void zbx_db_mock_field_init(zbx_db_mock_field_t *field, int field_type, int fiel /****************************************************************************** * * - * Function: zbx_db_mock_field_append * - * * * Purpose: 'appends' text to the field, if successful the character/byte * * limits are updated * * * @@ -3792,8 +3676,6 @@ int zbx_db_mock_field_append(zbx_db_mock_field_t *field, const char *text) /****************************************************************************** * * - * Function: zbx_db_check_instanceid * - * * * Purpose: checks instanceid value in config table and generates new * * instance id if its empty * * * @@ -3841,8 +3723,6 @@ int zbx_db_check_instanceid(void) #if defined(HAVE_POSTGRESQL) /****************************************************************************** * * - * Function: zbx_db_get_schema_esc * - * * * Purpose: returns escaped DB schema name * * * ******************************************************************************/ diff --git a/src/libs/zbxdbhigh/discovery.c b/src/libs/zbxdbhigh/discovery.c index 712efdbf6f1..7ecce9dc7bf 100644 --- a/src/libs/zbxdbhigh/discovery.c +++ b/src/libs/zbxdbhigh/discovery.c @@ -68,8 +68,6 @@ static DB_RESULT discovery_get_dhost_by_ip_port(zbx_uint64_t druleid, const char /****************************************************************************** * * - * Function: discovery_separate_host * - * * * Purpose: separate multiple-IP hosts * * * * Parameters: host ip address * @@ -123,8 +121,6 @@ static void discovery_separate_host(const DB_DRULE *drule, DB_DHOST *dhost, cons /****************************************************************************** * * - * Function: discovery_register_host * - * * * Purpose: register host if one does not exist * * * * Parameters: host ip address * @@ -195,8 +191,6 @@ static void discovery_register_host(const DB_DRULE *drule, zbx_uint64_t dcheckid /****************************************************************************** * * - * Function: discovery_register_service * - * * * Purpose: register service if one does not exist * * * * Parameters: host ip address * @@ -287,8 +281,6 @@ static void discovery_register_service(zbx_uint64_t dcheckid, DB_DHOST *dhost, D /****************************************************************************** * * - * Function: discovery_update_dservice * - * * * Purpose: update discovered service details * * * ******************************************************************************/ @@ -307,8 +299,6 @@ static void discovery_update_dservice(zbx_uint64_t dserviceid, int status, int l /****************************************************************************** * * - * Function: discovery_update_dservice_value * - * * * Purpose: update discovered service details * * * ******************************************************************************/ @@ -325,8 +315,6 @@ static void discovery_update_dservice_value(zbx_uint64_t dserviceid, const char /****************************************************************************** * * - * Function: discovery_update_dhost * - * * * Purpose: update discovered host details * * * ******************************************************************************/ @@ -338,8 +326,6 @@ static void discovery_update_dhost(const DB_DHOST *dhost) /****************************************************************************** * * - * Function: discovery_update_service_status * - * * * Purpose: process and update the new service status * * * ******************************************************************************/ @@ -401,8 +387,6 @@ static void discovery_update_service_status(DB_DHOST *dhost, const DB_DSERVICE * /****************************************************************************** * * - * Function: discovery_update_host_status * - * * * Purpose: update new host status * * * ******************************************************************************/ @@ -448,8 +432,6 @@ static void discovery_update_host_status(DB_DHOST *dhost, int status, int now) /****************************************************************************** * * - * Function: discovery_update_host * - * * * Purpose: process new host status * * * * Parameters: host - host info * @@ -467,8 +449,6 @@ void discovery_update_host(DB_DHOST *dhost, int status, int now) /****************************************************************************** * * - * Function: discovery_update_service * - * * * Purpose: process new service status * * * * Parameters: service - service info * diff --git a/src/libs/zbxdbhigh/event.c b/src/libs/zbxdbhigh/event.c index 800f5e74f0b..d6a9034c867 100644 --- a/src/libs/zbxdbhigh/event.c +++ b/src/libs/zbxdbhigh/event.c @@ -24,8 +24,6 @@ /****************************************************************************** * * - * Function: zbx_db_get_events_by_eventids * - * * * Purpose: get events and flags that indicate what was filled in DB_EVENT * * structure * * * @@ -217,8 +215,6 @@ void zbx_db_get_events_by_eventids(zbx_vector_uint64_t *eventids, zbx_vector_ptr /****************************************************************************** * * - * Function: zbx_db_free_event * - * * * Purpose: free the event with it's resources * * * * Parameters: event - [IN] event data * @@ -242,8 +238,6 @@ void zbx_db_free_event(DB_EVENT *event) /****************************************************************************** * * - * Function: get_db_eventid_r_eventid_pairs * - * * * Purpose: get recovery event IDs by event IDs then map them together also * * additional create a separate array of recovery event IDs * * * diff --git a/src/libs/zbxdbhigh/export.c b/src/libs/zbxdbhigh/export.c index 95a85f5ea39..14461082512 100644 --- a/src/libs/zbxdbhigh/export.c +++ b/src/libs/zbxdbhigh/export.c @@ -45,8 +45,6 @@ static char *export_dir; /****************************************************************************** * * - * Function: zbx_validate_export_type * - * * * Purpose: validate export type * * * * Parameters: export_type - [in] list of export types * @@ -114,8 +112,6 @@ int zbx_validate_export_type(char *export_type, uint32_t *export_mask) /****************************************************************************** * * - * Function: zbx_is_export_enabled * - * * * Purpose: checks if export is enabled for given type(s) * * * * Parameters: flag - ZBX_FLAG_EXPTYPE_EVENTS events are enabled * diff --git a/src/libs/zbxdbhigh/graph_linking.c b/src/libs/zbxdbhigh/graph_linking.c index 13875d137a1..9799f3114b4 100644 --- a/src/libs/zbxdbhigh/graph_linking.c +++ b/src/libs/zbxdbhigh/graph_linking.c @@ -867,8 +867,6 @@ static void prepare_graph_for_insert(graphs_items_entry_t *graphs_items_template /************************************************************************************ * * - * Function: process_template_graph * - * * * Description: 1) gets a template graph and host graph and compares them * * 2) if they are the same (they have same names and all of * * their items keys are the same) and checks which fields * @@ -946,8 +944,6 @@ static int process_template_graph(zbx_uint64_t host_graphid, zbx_hashset_t *host /************************************************************************************ * * - * Function: process_graphs * - * * * Description: 1) gets a list graph from the templates * * 2) gets a list of graphs_items for that graph * * 3) gets all the current host graphs (with names that match any of * @@ -1464,8 +1460,6 @@ static int execute_graphs_inserts(zbx_vector_graphs_copies_t *graphs_copies_inse /****************************************************************************** * * - * Function: DBcopy_template_graphs * - * * * Purpose: copy graphs from template to host * * * * Parameters: hostid - [IN] host identifier from database * diff --git a/src/libs/zbxdbhigh/host.c b/src/libs/zbxdbhigh/host.c index 50e9263b920..b41964b9b8c 100644 --- a/src/libs/zbxdbhigh/host.c +++ b/src/libs/zbxdbhigh/host.c @@ -59,8 +59,6 @@ static int zbx_ids_names_compare_func(const void *d1, const void *d2) /****************************************************************************** * * - * Function: DBselect_ids_names * - * * * Parameters: sql - [IN] sql statement * * ids - [OUT] sorted list of selected uint64 values * * names - [OUT] list of names of the requested resource, order * @@ -171,8 +169,6 @@ static char *get_template_names(const zbx_vector_uint64_t *templateids) /****************************************************************************** * * - * Function: DBget_profiles_by_source_idxs_values * - * * * Description: gets a vector of profile identifiers used with the specified * * source, indexes and value identifiers * * * @@ -211,8 +207,6 @@ static void DBget_profiles_by_source_idxs_values(zbx_vector_uint64_t *profileids /****************************************************************************** * * - * Function: DBget_sysmapelements_by_element_type_ids * - * * * Description: gets a vector of sysmap element identifiers used with the * * specified element type and identifiers * * * @@ -244,8 +238,6 @@ static void DBget_sysmapelements_by_element_type_ids(zbx_vector_uint64_t *seleme /****************************************************************************** * * - * Function: validate_linked_templates * - * * * Description: Check collisions between linked templates * * * * Parameters: templateids - [IN] array of template IDs * @@ -448,8 +440,6 @@ out: /****************************************************************************** * * - * Function: validate_inventory_links * - * * * Description: Check collisions in item inventory links * * * * Parameters: hostid - [IN] host identifier from database * @@ -539,8 +529,6 @@ out: /****************************************************************************** * * - * Function: validate_httptests * - * * * Description: checking collisions on linking of web scenarios * * * * Parameters: hostid - [IN] host identifier from database * @@ -642,8 +630,6 @@ static void zbx_graph_valid_free(zbx_template_graph_valid_t *graph) /****************************************************************************** * * - * Function: validate_host * - * * * Description: Check collisions between host and linked template * * * * Parameters: hostid - [IN] host identifier from database * @@ -900,8 +886,6 @@ out: /****************************************************************************** * * - * Function: DBdelete_action_conditions * - * * * Purpose: delete action conditions by condition type and id * * * * Author: Alexander Vladishev * @@ -972,8 +956,6 @@ static void DBdelete_action_conditions(int conditiontype, zbx_uint64_t elementid /****************************************************************************** * * - * Function: DBadd_to_housekeeper * - * * * Purpose: adds table and field with specific id to housekeeper list * * * * Parameters: ids - [IN] identifiers for data removal * @@ -1016,8 +998,6 @@ out: /****************************************************************************** * * - * Function: DBdelete_triggers * - * * * Purpose: delete trigger from database * * * * Parameters: triggerids - [IN] trigger identifiers from database * @@ -1073,8 +1053,6 @@ void DBdelete_triggers(zbx_vector_uint64_t *triggerids) /****************************************************************************** * * - * Function: DBdelete_trigger_hierarchy * - * * * Purpose: delete parent triggers and auto-created children from database * * * * Parameters: triggerids - [IN] trigger identifiers from database * @@ -1115,8 +1093,6 @@ out: /****************************************************************************** * * - * Function: DBdelete_triggers_by_itemids * - * * * Purpose: delete triggers by itemid * * * * Parameters: itemids - [IN] item identifiers from database * @@ -1154,8 +1130,6 @@ out: /****************************************************************************** * * - * Function: DBdelete_graphs * - * * * Purpose: delete graph from database * * * * Parameters: graphids - [IN] array of graph id's from database * @@ -1207,8 +1181,6 @@ out: /****************************************************************************** * * - * Function: DBdelete_graph_hierarchy * - * * * Purpose: delete parent graphs and auto-created children from database * * * * Parameters: graphids - [IN] array of graph id's from database * @@ -1249,8 +1221,6 @@ out: /****************************************************************************** * * - * Function: DBdelete_graphs_by_itemids * - * * * Parameters: itemids - [IN] item identifiers from database * * * * Author: Alexander Vladishev * @@ -1314,8 +1284,6 @@ out: /****************************************************************************** * * - * Function: DBdelete_items * - * * * Purpose: delete items from database * * * * Parameters: itemids - [IN] array of item identifiers from database * @@ -1417,8 +1385,6 @@ out: /****************************************************************************** * * - * Function: DBdelete_httptests * - * * * Purpose: delete web tests from database * * * * Parameters: httptestids - [IN] array of httptest id's from database * @@ -1478,8 +1444,6 @@ out: /****************************************************************************** * * - * Function: DBgroup_prototypes_delete * - * * * Parameters: del_group_prototypeids - [IN] list of group_prototypeids which * * will be deleted * * * @@ -1521,8 +1485,6 @@ static void DBgroup_prototypes_delete(const zbx_vector_uint64_t *del_group_proto /****************************************************************************** * * - * Function: DBdelete_host_prototypes * - * * * Purpose: deletes host prototypes from database * * * * Parameters: host_prototype_ids - [IN] list of host prototype ids * @@ -1594,8 +1556,6 @@ out: /****************************************************************************** * * - * Function: DBdelete_template_httptests * - * * * Purpose: delete template web scenatios from host * * * * Parameters: hostid - [IN] host identifier from database * @@ -1635,8 +1595,6 @@ clean: /****************************************************************************** * * - * Function: DBdelete_template_graphs * - * * * Purpose: delete template graphs from host * * * * Parameters: hostid - [IN] host identifier from database * @@ -1680,8 +1638,6 @@ static void DBdelete_template_graphs(zbx_uint64_t hostid, const zbx_vector_uint6 /****************************************************************************** * * - * Function: DBdelete_template_triggers * - * * * Purpose: delete template triggers from host * * * * Parameters: hostid - [IN] host identifier from database * @@ -1724,8 +1680,6 @@ static void DBdelete_template_triggers(zbx_uint64_t hostid, const zbx_vector_uin /****************************************************************************** * * - * Function: DBdelete_template_host_prototypes * - * * * Purpose: delete template host prototypes from host * * * * Parameters: hostid - [IN] host identifier from database * @@ -1770,8 +1724,6 @@ clean: /****************************************************************************** * * - * Function: DBdelete_template_items * - * * * Purpose: delete template items from host * * * * Parameters: hostid - [IN] host identifier from database * @@ -1814,8 +1766,6 @@ clean: /****************************************************************************** * * - * Function: get_templates_by_hostid * - * * * Description: Retrieve already linked templates for specified host * * * * Parameters: hostid - [IN] host identifier from database * @@ -1848,8 +1798,6 @@ static void get_templates_by_hostid(zbx_uint64_t hostid, zbx_vector_uint64_t *te /****************************************************************************** * * - * Function: DBdelete_template_elements * - * * * Parameters: hostid - [IN] host identifier from database * * hostname - [IN] name of the host * * del_templateids - [IN] array of template IDs * @@ -2201,8 +2149,6 @@ static void DBhost_prototypes_clean(zbx_vector_ptr_t *host_prototypes) /****************************************************************************** * * - * Function: DBis_regular_host * - * * * Comments: auxiliary function for DBcopy_template_host_prototypes() * * * ******************************************************************************/ @@ -2226,8 +2172,6 @@ static int DBis_regular_host(zbx_uint64_t hostid) /****************************************************************************** * * - * Function: DBhost_prototypes_make * - * * * Comments: auxiliary function for DBcopy_template_host_prototypes() * * * ******************************************************************************/ @@ -2394,8 +2338,6 @@ static void DBhost_prototypes_make(zbx_uint64_t hostid, zbx_vector_uint64_t *tem /****************************************************************************** * * - * Function: DBhost_prototypes_templates_make * - * * * Parameters: host_prototypes - [IN/OUT] list of host prototypes * * should be sorted by templateid * * del_hosttemplateids - [OUT] list of hosttemplateids which * @@ -2528,8 +2470,6 @@ static void DBhost_prototypes_templates_make(zbx_vector_ptr_t *host_prototypes, /****************************************************************************** * * - * Function: DBhost_prototypes_groups_make * - * * * Parameters: host_prototypes - [IN/OUT] list of host prototypes * * should be sorted by templateid * * del_group_prototypeids - [OUT] sorted list of * @@ -2677,8 +2617,6 @@ static void DBhost_prototypes_groups_make(zbx_vector_ptr_t *host_prototypes, /****************************************************************************** * * - * Function: DBhost_prototypes_macro_make * - * * * Purpose: validate hostmacros value changes * * * * Parameters: hostmacros - [IN/OUT] list of hostmacros * @@ -2733,8 +2671,6 @@ static int DBhost_prototypes_macro_make(zbx_vector_macros_t *hostmacros, zbx_uin /****************************************************************************** * * - * Function: DBhost_prototypes_interface_make * - * * * Purpose: fill empty value in interfaces with input parameters * * * * Parameters: interfaces - [IN/OUT] list of host interfaces * @@ -2897,8 +2833,6 @@ static int DBhost_prototypes_interface_make(zbx_vector_interfaces_t *interfaces, /****************************************************************************** * * - * Function: DBhost_prototypes_macros_make * - * * * Parameters: host_prototypes - [IN/OUT] list of host prototypes * * should be sorted by templateid * * del_macroids - [OUT] sorted list of host macroids which * @@ -3046,8 +2980,6 @@ static void DBhost_prototypes_macros_make(zbx_vector_ptr_t *host_prototypes, zbx /****************************************************************************** * * - * Function: DBhost_prototypes_tags_make * - * * * Parameters: host_prototypes - [IN/OUT] list of host prototypes * * should be sorted by templateid * * del_tagids - [OUT] list of host tagids which * @@ -3197,10 +3129,6 @@ static void DBhost_prototypes_tags_make(zbx_vector_ptr_t *host_prototypes, zbx_v /****************************************************************************** * * - * Function: DBhost_prototypes_save * - * * - * Function: DBhost_prototypes_interfaces_make * - * * * Purpose: prepare interfaces to be added, updated or removed from DB * * Parameters: host_prototypes - [IN/OUT] list of host prototypes * * should be sorted by templateid * @@ -3446,8 +3374,6 @@ static void DBhost_prototypes_interfaces_make(zbx_vector_ptr_t *host_prototypes, /****************************************************************************** * * - * Function: DBhost_prototypes_interface_snmp_prepare_sql * - * * * Purpose: prepare sql for update record of interface_snmp table * * * * Parameters: hostid - [IN] host identifier * @@ -3572,8 +3498,6 @@ static void DBhost_prototypes_interface_snmp_prepare_sql(zbx_uint64_t hostid, co /****************************************************************************** * * - * Function: DBhost_prototypes_save * - * * * Purpose: auxiliary function for DBcopy_template_host_prototypes() * * * * Parameters: host_prototypes - [IN] vector of host prototypes * @@ -4320,8 +4244,6 @@ static void DBhost_prototypes_save(const zbx_vector_ptr_t *host_prototypes, /****************************************************************************** * * - * Function: DBcopy_template_host_prototypes * - * * * Purpose: copy host prototypes from templates and create links between * * them and discovery rules * * * @@ -4521,8 +4443,6 @@ httpfield_t; /****************************************************************************** * * - * Function: DBget_httptests * - * * ******************************************************************************/ static void DBget_httptests(const zbx_uint64_t hostid, const zbx_vector_uint64_t *templateids, zbx_vector_ptr_t *httptests) @@ -5070,8 +4990,6 @@ static void DBget_httptests(const zbx_uint64_t hostid, const zbx_vector_uint64_t /****************************************************************************** * * - * Function: DBsave_httptests * - * * ******************************************************************************/ static void DBsave_httptests(zbx_uint64_t hostid, const zbx_vector_ptr_t *httptests) { @@ -5615,8 +5533,6 @@ static void DBsave_httptests(zbx_uint64_t hostid, const zbx_vector_ptr_t *httpte /****************************************************************************** * * - * Function: clean_httptests * - * * ******************************************************************************/ static void clean_httptests(zbx_vector_ptr_t *httptests) { @@ -5721,8 +5637,6 @@ static void clean_httptests(zbx_vector_ptr_t *httptests) /****************************************************************************** * * - * Function: DBcopy_template_httptests * - * * * Purpose: copy web scenarios from template to host * * * * Parameters: hostid - [IN] host identifier from database * @@ -5748,8 +5662,6 @@ static void DBcopy_template_httptests(zbx_uint64_t hostid, const zbx_vector_uint /****************************************************************************** * * - * Function: DBcopy_template_elements * - * * * Purpose: copy elements from specified template * * * * Parameters: hostid - [IN] host identifier from database * @@ -5846,8 +5758,6 @@ clean: /****************************************************************************** * * - * Function: DBdelete_hosts * - * * * Purpose: delete hosts from database with all elements * * * * Parameters: hostids - [IN] host identifiers from database * @@ -5938,8 +5848,6 @@ out: /****************************************************************************** * * - * Function: DBdelete_hosts_with_prototypes * - * * * Purpose: delete hosts from database, check if there are any host * * prototypes and delete them first * * * @@ -5982,8 +5890,6 @@ clean: /****************************************************************************** * * - * Function: DBadd_interface * - * * * Purpose: add new interface to specified host * * * * Parameters: hostid - [IN] host identifier from database * @@ -6129,8 +6035,6 @@ out: /****************************************************************************** * * - * Function: DBadd_interface_snmp * - * * * Purpose: add new or update interface options to specified interface * * * * Parameters: interfaceid - [IN] interface id from database * @@ -6272,8 +6176,6 @@ out: /****************************************************************************** * * - * Function: DBdelete_groups_validate * - * * * Purpose: removes the groupids from the list which cannot be deleted * * (host or template can remain without groups or it's an internal * * group or it's used by a host prototype) * @@ -6401,8 +6303,6 @@ static void DBdelete_groups_validate(zbx_vector_uint64_t *groupids) /****************************************************************************** * * - * Function: DBdelete_groups * - * * * Purpose: delete host groups from database * * * * Parameters: groupids - [IN] array of group identifiers from database * @@ -6459,8 +6359,6 @@ out: /****************************************************************************** * * - * Function: DBadd_host_inventory * - * * * Purpose: adds host inventory to the host * * * * Parameters: hostid - [IN] host identifier * @@ -6480,8 +6378,6 @@ void DBadd_host_inventory(zbx_uint64_t hostid, int inventory_mode) /****************************************************************************** * * - * Function: DBset_host_inventory * - * * * Purpose: sets host inventory mode for the specified host * * * * Parameters: hostid - [IN] host identifier * diff --git a/src/libs/zbxdbhigh/item.c b/src/libs/zbxdbhigh/item.c index 909a88e898d..de00601daa7 100644 --- a/src/libs/zbxdbhigh/item.c +++ b/src/libs/zbxdbhigh/item.c @@ -23,8 +23,6 @@ /****************************************************************************** * * - * Function: zbx_db_save_item_changes * - * * * Purpose: save item state, error, mtime, lastlogsize changes to * * database * * * diff --git a/src/libs/zbxdbhigh/lld_macro.c b/src/libs/zbxdbhigh/lld_macro.c index 5624cb5658e..7533c18f459 100644 --- a/src/libs/zbxdbhigh/lld_macro.c +++ b/src/libs/zbxdbhigh/lld_macro.c @@ -24,8 +24,6 @@ /****************************************************************************** * * - * Function: lld_macro_paths_compare * - * * * Purpose: sorting function to sort LLD macros by unique name * * * ******************************************************************************/ @@ -39,8 +37,6 @@ int zbx_lld_macro_paths_compare(const void *d1, const void *d2) /****************************************************************************** * * - * Function: lld_macro_paths_get * - * * * Purpose: retrieve list of LLD macros * * * * Parameters: lld_ruleid - [IN] LLD id * @@ -93,8 +89,6 @@ int zbx_lld_macro_paths_get(zbx_uint64_t lld_ruleid, zbx_vector_ptr_t *lld_macro /****************************************************************************** * * - * Function: lld_macro_path_free * - * * * Purpose: release resources allocated by lld macro path * * * * Parameters: lld_macro_path - [IN] json path to extract from lld_row * @@ -109,8 +103,6 @@ void zbx_lld_macro_path_free(zbx_lld_macro_path_t *lld_macro_path) /****************************************************************************** * * - * Function: zbx_lld_macro_value_by_name * - * * * Purpose: get value of LLD macro using json path if available or by * * searching for such key in key value pairs of array entry * * * diff --git a/src/libs/zbxdbhigh/lld_override.c b/src/libs/zbxdbhigh/lld_override.c index 52f07c519dc..21e211ae280 100644 --- a/src/libs/zbxdbhigh/lld_override.c +++ b/src/libs/zbxdbhigh/lld_override.c @@ -38,8 +38,6 @@ void zbx_lld_override_operation_free(zbx_lld_override_operation_t *override_oper /****************************************************************************** * * - * Function: lld_override_operations_load_tags * - * * * Purpose: load tag override operations from database * * * * Parameters: overrideids - [IN] the lld overrideids, sorted * @@ -101,8 +99,6 @@ static void lld_override_operations_load_tags(const zbx_vector_uint64_t *overrid /****************************************************************************** * * - * Function: lld_override_operations_load_templates * - * * * Purpose: load template lld override operations from database * * * * Parameters: overrideids - [IN] the lld overrideids, sorted * @@ -162,8 +158,6 @@ static void lld_override_operations_load_templates(const zbx_vector_uint64_t *ov /****************************************************************************** * * - * Function: zbx_load_lld_override_operations * - * * * Purpose: load lld override operations from database * * * * Parameters: overrideids - [IN] the lld overrideids, sorted * diff --git a/src/libs/zbxdbhigh/maintenance.c b/src/libs/zbxdbhigh/maintenance.c index 0ad1237e103..e9d240ac677 100644 --- a/src/libs/zbxdbhigh/maintenance.c +++ b/src/libs/zbxdbhigh/maintenance.c @@ -22,8 +22,6 @@ /****************************************************************************** * * - * Function: zbx_db_lock_maintenanceids * - * * * Purpose: lock maintenances in database * * * * Parameters: maintenanceids - [IN/OUT] a vector of unique maintenance ids * diff --git a/src/libs/zbxdbhigh/proxy.c b/src/libs/zbxdbhigh/proxy.c index 59588f5ab11..4a9ca4cf241 100644 --- a/src/libs/zbxdbhigh/proxy.c +++ b/src/libs/zbxdbhigh/proxy.c @@ -135,8 +135,6 @@ zbx_keys_path_t; /****************************************************************************** * * - * Function: zbx_proxy_check_permissions * - * * * Purpose: check proxy connection permissions (encryption configuration and * * if peer proxy address is allowed) * * * @@ -230,8 +228,6 @@ int zbx_proxy_check_permissions(const DC_PROXY *proxy, const zbx_socket_t *sock, /****************************************************************************** * * - * Function: zbx_host_check_permissions * - * * * Purpose: checks host connection permissions (encryption configuration) * * * * Parameters: * @@ -317,8 +313,6 @@ static int zbx_host_check_permissions(const DC_HOST *host, const zbx_socket_t *s /****************************************************************************** * * - * Function: get_active_proxy_from_request * - * * * Purpose: * * Extract a proxy name from JSON and find the proxy ID in configuration * * cache, and check access rights. The proxy must be configured in active * @@ -357,8 +351,6 @@ int get_active_proxy_from_request(struct zbx_json_parse *jp, DC_PROXY *proxy, ch /****************************************************************************** * * - * Function: check_access_passive_proxy * - * * * Purpose: * * Check access rights to a passive proxy for the given connection and * * send a response if denied. * @@ -438,8 +430,6 @@ int check_access_passive_proxy(zbx_socket_t *sock, int send_response, const char /****************************************************************************** * * - * Function: proxyconfig_add_row * - * * * Purpose: add database row to the proxy config json data * * * * Parameters: j - [OUT] the output json * @@ -486,8 +476,6 @@ zbx_proxy_item_config_t; /****************************************************************************** * * - * Function: get_proxyconfig_table_items * - * * * Purpose: prepare items table proxy configuration data * * * ******************************************************************************/ @@ -654,8 +642,6 @@ skip_data: /****************************************************************************** * * - * Function: get_proxyconfig_table_items * - * * * Purpose: prepare items table proxy configuration data * * * ******************************************************************************/ @@ -774,8 +760,6 @@ static void key_path_free(void *data) /****************************************************************************** * * - * Function: get_proxyconfig_table * - * * * Purpose: prepare proxy configuration data * * * ******************************************************************************/ @@ -1098,8 +1082,6 @@ static void get_macro_secrets(const zbx_vector_ptr_t *keys_paths, struct zbx_jso /****************************************************************************** * * - * Function: get_proxyconfig_data * - * * * Purpose: prepare proxy configuration data * * * ******************************************************************************/ @@ -1192,8 +1174,6 @@ out: /****************************************************************************** * * - * Function: remember_record * - * * * Purpose: A record is stored as a sequence of fields and flag bytes for * * handling NULL values. A field is stored as a null-terminated * * string to preserve field boundaries. If a field value can be NULL * @@ -1252,8 +1232,6 @@ static int id_offset_compare_func(const void *d1, const void *d2) /****************************************************************************** * * - * Function: find_field_by_name * - * * * Purpose: find a number of the field * * * ******************************************************************************/ @@ -1272,8 +1250,6 @@ static int find_field_by_name(const ZBX_FIELD **fields, int fields_count, const /****************************************************************************** * * - * Function: compare_nth_field * - * * * Purpose: This function compares a value from JSON record with the value * * of the n-th field of DB record. For description how DB record is * * stored in memory see comments in function remember_record(). * @@ -1353,8 +1329,6 @@ static int compare_nth_field(const ZBX_FIELD **fields, const char *rec_data, int /****************************************************************************** * * - * Function: process_proxyconfig_table * - * * * Purpose: update configuration table * * * * Parameters: ... * @@ -1981,8 +1955,6 @@ out: /****************************************************************************** * * - * Function: process_proxyconfig * - * * * Purpose: update configuration * * * ******************************************************************************/ @@ -2100,8 +2072,6 @@ int process_proxyconfig(struct zbx_json_parse *jp_data, struct zbx_json_parse *j /****************************************************************************** * * - * Function: get_interface_availability_data * - * * * Return value: SUCCEED - processed successfully * * FAIL - no interface availability has been changed * * * @@ -2148,8 +2118,6 @@ out: /****************************************************************************** * * - * Function: process_interfaces_availability_contents * - * * * Purpose: parses interfaces availability data contents and processes it * * * * Return value: SUCCEED - processed successfully * @@ -2233,8 +2201,6 @@ out: /****************************************************************************** * * - * Function: proxy_get_lastid * - * * ******************************************************************************/ static void proxy_get_lastid(const char *table_name, const char *lastidfield, zbx_uint64_t *lastid) { @@ -2257,8 +2223,6 @@ static void proxy_get_lastid(const char *table_name, const char *lastidfield, zb /****************************************************************************** * * - * Function: proxy_set_lastid * - * * ******************************************************************************/ static void proxy_set_lastid(const char *table_name, const char *lastidfield, const zbx_uint64_t lastid) { @@ -2326,8 +2290,6 @@ int proxy_get_delay(const zbx_uint64_t lastid) /****************************************************************************** * * - * Function: proxy_get_history_data_simple * - * * * Purpose: Get history data from the database. * * * ******************************************************************************/ @@ -2436,8 +2398,6 @@ zbx_history_data_t; /****************************************************************************** * * - * Function: proxy_get_history_data * - * * * Purpose: read proxy history data from the database * * * * Parameters: lastid - [IN] the id of last processed proxy * @@ -2580,8 +2540,6 @@ try_again: /****************************************************************************** * * - * Function: proxy_add_hist_data * - * * * Purpose: add history records to output json * * * * Parameters: j - [IN] the json output buffer * @@ -2888,8 +2846,6 @@ void calc_timestamp(const char *line, int *timestamp, const char *format) /****************************************************************************** * * - * Function: process_item_value * - * * * Purpose: processes item value depending on proxy/flags settings * * * * Parameters: item - [IN] the item to process * @@ -2927,8 +2883,6 @@ static void process_item_value(const DC_ITEM *item, AGENT_RESULT *result, zbx_ti /****************************************************************************** * * - * Function: process_history_data_value * - * * * Purpose: process single value from incoming history data * * * * Parameters: item - [IN] the item to process * @@ -3027,8 +2981,6 @@ static int process_history_data_value(DC_ITEM *item, zbx_agent_value_t *value, i /****************************************************************************** * * - * Function: process_history_data * - * * * Purpose: process new item values * * * * Parameters: items - [IN] the items to process * @@ -3099,8 +3051,6 @@ int process_history_data(DC_ITEM *items, zbx_agent_value_t *values, int *errcode /****************************************************************************** * * - * Function: zbx_agent_values_clean * - * * * Purpose: frees resources allocated to store agent values * * * * Parameters: values - [IN] the values to clean * @@ -3120,8 +3070,6 @@ static void zbx_agent_values_clean(zbx_agent_value_t *values, size_t values_num) /****************************************************************************** * * - * Function: log_client_timediff * - * * * Purpose: calculates difference between server and client (proxy, active * * agent or sender) time and log it * * * @@ -3174,8 +3122,6 @@ static void log_client_timediff(int level, struct zbx_json_parse *jp, const zbx_ /****************************************************************************** * * - * Function: parse_history_data_row_value * - * * * Purpose: parses agent value from history data json row * * * * Parameters: jp_row - [IN] JSON with history data row * @@ -3274,8 +3220,6 @@ out: /****************************************************************************** * * - * Function: parse_history_data_row_itemid * - * * * Purpose: parses item identifier from history data json row * * * * Parameters: jp_row - [IN] JSON with history data row * @@ -3299,8 +3243,6 @@ static int parse_history_data_row_itemid(const struct zbx_json_parse *jp_row, zb } /****************************************************************************** * * - * Function: parse_history_data_row_hostkey * - * * * Purpose: parses host,key pair from history data json row * * * * Parameters: jp_row - [IN] JSON with history data row * @@ -3334,8 +3276,6 @@ static int parse_history_data_row_hostkey(const struct zbx_json_parse *jp_row, z /****************************************************************************** * * - * Function: parse_history_data * - * * * Purpose: parses up to ZBX_HISTORY_VALUES_MAX item values and host,key * * pairs from history data json * * * @@ -3405,8 +3345,6 @@ out: /****************************************************************************** * * - * Function: parse_history_data_by_itemids * - * * * Purpose: parses up to ZBX_HISTORY_VALUES_MAX item values and item * * identifiers from history data json * * * @@ -3482,8 +3420,6 @@ out: /****************************************************************************** * * - * Function: proxy_item_validator * - * * * Purpose: validates item received from proxy * * * * Parameters: item - [IN/OUT] the item data * @@ -3515,8 +3451,6 @@ static int proxy_item_validator(DC_ITEM *item, zbx_socket_t *sock, void *args, c /****************************************************************************** * * - * Function: process_history_data_by_itemids * - * * * Purpose: parses history data array and process the data * * * * Parameters: proxy - [IN] the proxy * @@ -3623,8 +3557,6 @@ static int process_history_data_by_itemids(zbx_socket_t *sock, zbx_client_item_v /****************************************************************************** * * - * Function: agent_item_validator * - * * * Purpose: validates item received from active agent * * * * Parameters: item - [IN] the item data * @@ -3657,8 +3589,6 @@ static int agent_item_validator(DC_ITEM *item, zbx_socket_t *sock, void *args, c /****************************************************************************** * * - * Function: sender_item_validator * - * * * Purpose: validates item received from sender * * * * Parameters: item - [IN] the item data * @@ -3827,8 +3757,6 @@ static void process_history_data_by_keys(zbx_socket_t *sock, zbx_client_item_val /****************************************************************************** * * - * Function: process_client_history_data * - * * * Purpose: process history data sent by proxy/agent/sender * * * * Parameters: sock - [IN] the connection socket * @@ -3918,8 +3846,6 @@ out: /****************************************************************************** * * - * Function: process_agent_history_data * - * * * Purpose: process history data received from Zabbix active agent * * * * Parameters: sock - [IN] the connection socket * @@ -3941,8 +3867,6 @@ int process_agent_history_data(zbx_socket_t *sock, struct zbx_json_parse *jp, zb /****************************************************************************** * * - * Function: process_sender_history_data * - * * * Purpose: process history data received from Zabbix sender * * * * Parameters: sock - [IN] the connection socket * @@ -3979,8 +3903,6 @@ static void zbx_drule_free(zbx_drule_t *drule) /****************************************************************************** * * - * Function: process_services * - * * * Purpose: process services discovered on IP address * * * * Parameters: drule_ptr - [IN] discovery rule structure * @@ -4154,8 +4076,6 @@ fail: /****************************************************************************** * * - * Function: process_discovery_data_contents * - * * * Purpose: parse discovery data contents and process it * * * * Parameters: jp_data - [IN] JSON with discovery data * @@ -4341,8 +4261,6 @@ json_parse_return: /****************************************************************************** * * - * Function: process_autoregistration_contents * - * * * Purpose: parse autoregistration data contents and process it * * * * Parameters: jp_data - [IN] JSON with autoregistration data * @@ -4493,8 +4411,6 @@ static int process_autoregistration_contents(struct zbx_json_parse *jp_data, zbx /****************************************************************************** * * - * Function: proxy_get_history_count * - * * * Purpose: get the number of values waiting to be sent to the sever * * * * Return value: the number of history values * @@ -4525,8 +4441,6 @@ int proxy_get_history_count(void) /****************************************************************************** * * - * Function: zbx_get_proxy_protocol_version * - * * * Purpose: extracts protocol version from json data * * * * Parameters: * @@ -4553,8 +4467,6 @@ int zbx_get_proxy_protocol_version(struct zbx_json_parse *jp) /****************************************************************************** * * - * Function: process_tasks_contents * - * * * Purpose: parse tasks contents and saves the received tasks * * * * Parameters: jp_tasks - [IN] JSON with tasks data * @@ -4578,8 +4490,6 @@ static void process_tasks_contents(struct zbx_json_parse *jp_tasks) /****************************************************************************** * * - * Function: zbx_strcatnl_alloc * - * * * Purpose: appends text to the string on a new line * * * ******************************************************************************/ @@ -4593,8 +4503,6 @@ static void zbx_strcatnl_alloc(char **info, size_t *info_alloc, size_t *info_off /****************************************************************************** * * - * Function: check_proxy_nodata * - * * * Purpose: detect lost connection with proxy and calculate suppression * * window if possible * * * @@ -4629,8 +4537,6 @@ static void check_proxy_nodata(zbx_timespec_t *ts, unsigned char proxy_status, z /****************************************************************************** * * - * Function: check_proxy_nodata_empty * - * * * Purpose: detect lack of data during lost connectivity * * * * Parameters: ts - [IN] timestamp when the proxy connection was * @@ -4661,8 +4567,6 @@ static void check_proxy_nodata_empty(zbx_timespec_t *ts, unsigned char proxy_sta /****************************************************************************** * * - * Function: process_proxy_data * - * * * Purpose: process 'proxy data' request * * * * Parameters: proxy - [IN] the source proxy * @@ -4800,8 +4704,6 @@ out: /****************************************************************************** * * - * Function: zbx_db_flush_proxy_lastaccess * - * * * Purpose: flushes lastaccess changes for proxies every * * ZBX_PROXY_LASTACCESS_UPDATE_FREQUENCY seconds * * * @@ -4852,8 +4754,6 @@ static void zbx_db_flush_proxy_lastaccess(void) /****************************************************************************** * * - * Function: zbx_update_proxy_data * - * * * Purpose: updates proxy runtime properties in cache and database. * * * * Parameters: proxy - [IN/OUT] the proxy * @@ -4898,8 +4798,6 @@ void zbx_update_proxy_data(DC_PROXY *proxy, int version, int lastaccess, int com } /****************************************************************************** * * - * Function: zbx_update_proxy_lasterror * - * * * Purpose: flushes last_version_error_time changes runtime * * variable for proxies structures * * * @@ -4917,8 +4815,6 @@ static void zbx_update_proxy_lasterror(DC_PROXY *proxy) } /****************************************************************************** * * - * Function: zbx_check_protocol_version * - * * * Purpose: check server and proxy versions and compatibility rules * * * * Parameters: * diff --git a/src/libs/zbxdbhigh/template_item.c b/src/libs/zbxdbhigh/template_item.c index c0feae4a752..77fff9056e7 100644 --- a/src/libs/zbxdbhigh/template_item.c +++ b/src/libs/zbxdbhigh/template_item.c @@ -188,8 +188,6 @@ static void DBget_interfaces_by_hostid(zbx_uint64_t hostid, zbx_uint64_t *interf /****************************************************************************** * * - * Function: get_template_items * - * * * Purpose: read template items from database * * * * Parameters: hostid - [IN] host id * @@ -525,8 +523,6 @@ static void get_template_items(zbx_uint64_t hostid, const zbx_vector_uint64_t *t /****************************************************************************** * * - * Function: get_template_lld_rule_map * - * * * Purpose: reads template lld rule conditions and host lld_rule identifiers * * from database * * * @@ -672,8 +668,6 @@ static void get_template_lld_rule_map(const zbx_vector_ptr_t *items, zbx_vector_ /****************************************************************************** * * - * Function: calculate_template_lld_rule_conditionids * - * * * Purpose: calculate identifiers for new item conditions * * * * Parameters: rules - [IN] the lld rule mapping * @@ -735,8 +729,6 @@ static void update_template_lld_formula(char **formula, zbx_uint64_t id_proto, z /****************************************************************************** * * - * Function: update_template_lld_rule_formulas * - * * * Purpose: translate template item condition identifiers in expression type * * discovery rule formulas to refer the host item condition * * identifiers instead. * @@ -794,8 +786,6 @@ static void update_template_lld_rule_formulas(zbx_vector_ptr_t *items, zbx_vecto /****************************************************************************** * * - * Function: save_template_item * - * * * Purpose: save (insert or update) template item * * * * Parameters: hostid - [IN] parent host id * @@ -977,8 +967,6 @@ dependent: /****************************************************************************** * * - * Function: save_template_items * - * * * Purpose: saves template items to the target host in database * * * * Parameters: hostid - [IN] the target host * @@ -1065,8 +1053,6 @@ static void save_template_items(zbx_uint64_t hostid, zbx_vector_ptr_t *items) /****************************************************************************** * * - * Function: save_template_lld_rules * - * * * Purpose: saves template lld rule item conditions to the target host in * * database * * * @@ -1249,8 +1235,6 @@ static void save_template_lld_rules(zbx_vector_ptr_t *items, zbx_vector_ptr_t *r /****************************************************************************** * * - * Function: save_template_discovery_prototypes * - * * * Purpose: saves host item prototypes in database * * * * Parameters: hostid - [IN] the target host * @@ -1406,8 +1390,6 @@ static void zbx_lld_macros_free(zbx_template_lld_macro_t *macro) /****************************************************************************** * * - * Function: free_template_item * - * * * Purpose: frees template item * * * * Parameters: item - [IN] the template item * @@ -1476,8 +1458,6 @@ static void free_template_item(zbx_template_item_t *item) /****************************************************************************** * * - * Function: free_lld_rule_condition * - * * * Purpose: frees lld rule condition * * * * Parameters: item - [IN] the lld rule condition * @@ -1496,8 +1476,6 @@ static void free_lld_rule_condition(zbx_lld_rule_condition_t *condition) /****************************************************************************** * * - * Function: free_lld_rule_map * - * * * Purpose: frees lld rule mapping * * * * Parameters: item - [IN] the lld rule mapping * @@ -1531,8 +1509,6 @@ static int template_item_compare_func(const void *d1, const void *d2) /****************************************************************************** * * - * Function: copy_template_items_preproc * - * * * Purpose: copy template item preprocessing options * * * * Parameters: items - [IN] vector of new/updated items * @@ -1713,8 +1689,6 @@ static void copy_template_items_preproc(const zbx_vector_ptr_t *items) /****************************************************************************** * * - * Function: copy_template_item_tags * - * * * Purpose: copy template item tags * * * * Parameters: items - [IN] vector of new/updated items * @@ -1865,8 +1839,6 @@ static void copy_template_item_tags(const zbx_vector_ptr_t *items) /****************************************************************************** * * - * Function: copy_template_item_script_params * - * * * Purpose: copy template item script parameters * * * * Parameters: items - [IN] vector of new/updated items * @@ -2020,8 +1992,6 @@ static void copy_template_item_script_params(const zbx_vector_ptr_t *items) /****************************************************************************** * * - * Function: copy_template_lld_macro_paths * - * * * Purpose: copy template discovery item lld macro paths * * * * Parameters: items - [IN] vector of new/updated items * @@ -2630,8 +2600,6 @@ static void copy_template_lld_overrides(const zbx_vector_uint64_t *templateids, /****************************************************************************** * * - * Function: compare_template_items * - * * * Purpose: compare templateid of two template items * * * * Parameters: d1 - [IN] first template item * @@ -2650,8 +2618,6 @@ static int compare_template_items(const void *d1, const void *d2) /****************************************************************************** * * - * Function: link_template_dependent_items * - * * * Purpose: create dependent item index in master item data * * * * Parameters: items - [IN/OUT] the template items * @@ -2727,8 +2693,6 @@ static int template_lld_macro_sort_by_macro(const void *d1, const void *d2) } /****************************************************************************** * * - * Function: link_template_items_preproc * - * * * Purpose: create item_preproc vectors in item data * * * * Parameters: templateids - [IN] vector of template IDs * @@ -2907,8 +2871,6 @@ static void link_template_items_preproc(const zbx_vector_uint64_t *templateids, /****************************************************************************** * * - * Function: link_template_items_tag * - * * * Purpose: create item_tags vectors in item data * * * * Parameters: templateids - [IN] vector of template IDs * @@ -3070,8 +3032,6 @@ static void link_template_items_tag(const zbx_vector_uint64_t *templateids, zbx_ /****************************************************************************** * * - * Function: link_template_items_param * - * * * Purpose: create item_params vectors in item data * * * * Parameters: templateids - [IN] vector of template IDs * @@ -3248,8 +3208,6 @@ static void link_template_items_param(const zbx_vector_uint64_t *templateids, zb /****************************************************************************** * * - * Function: link_template_lld_macro_paths * - * * * Purpose: create lld_macro vectors in item data * * * * Parameters: templateids - [IN] vector of template IDs * @@ -3411,8 +3369,6 @@ static void link_template_lld_macro_paths(const zbx_vector_uint64_t *templateids } /****************************************************************************** * * - * Function: prepare_lld_items * - * * * Purpose: prepare lld items by indexing them and scanning for already * * existing items * * * @@ -3445,8 +3401,6 @@ static void prepare_lld_items(const zbx_vector_ptr_t *items, zbx_vector_uint64_t /****************************************************************************** * * - * Function: DBcopy_template_items * - * * * Purpose: copy template items to host * * * * Parameters: hostid - [IN] host id * diff --git a/src/libs/zbxdbhigh/trigger.c b/src/libs/zbxdbhigh/trigger.c index 00de66a938c..1828f7fc1c4 100644 --- a/src/libs/zbxdbhigh/trigger.c +++ b/src/libs/zbxdbhigh/trigger.c @@ -34,8 +34,6 @@ /****************************************************************************** * * - * Function: zbx_process_trigger * - * * * Purpose: 1) calculate changeset of trigger fields to be updated * * 2) generate events * * * @@ -145,8 +143,6 @@ out: /****************************************************************************** * * - * Function: zbx_db_save_trigger_changes * - * * * Purpose: save the trigger changes to database * * * * Parameters: trigger_diff - [IN] the trigger changeset * @@ -218,8 +214,6 @@ void zbx_db_save_trigger_changes(const zbx_vector_ptr_t *trigger_diff) /****************************************************************************** * * - * Function: zbx_trigger_diff_free * - * * * Purpose: frees trigger changeset * * * ******************************************************************************/ @@ -246,8 +240,6 @@ static int zbx_trigger_topoindex_compare(const void *d1, const void *d2) /****************************************************************************** * * - * Function: zbx_process_triggers * - * * * Purpose: process triggers - calculates property changeset and generates * * events * * * @@ -280,8 +272,6 @@ out: /****************************************************************************** * * - * Function: zbx_append_trigger_diff * - * * * Purpose: Adds a new trigger diff to trigger changeset vector * * * ******************************************************************************/ @@ -327,8 +317,6 @@ zbx_trigger_cache_state_t; /****************************************************************************** * * - * Function: db_trigger_get_cache * - * * * Purpose: get trigger cache with the requested data cached * * * * Parameters: trigger - [IN] the trigger * @@ -403,8 +391,6 @@ static zbx_trigger_cache_t *db_trigger_get_cache(const DB_TRIGGER *trigger, zbx_ /****************************************************************************** * * - * Function: trigger_cache_free * - * * * Purpose: free trigger cache * * * * Parameters: cache - [IN] the trigger cache * @@ -426,8 +412,6 @@ static void trigger_cache_free(zbx_trigger_cache_t *cache) /****************************************************************************** * * - * Function: zbx_db_trigger_get_all_functionids * - * * * Purpose: get functionids from trigger expression and recovery expression * * * * Parameters: trigger - [IN] the trigger * @@ -452,8 +436,6 @@ void zbx_db_trigger_get_all_functionids(const DB_TRIGGER *trigger, zbx_vector_ui /****************************************************************************** * * - * Function: zbx_db_trigger_get_functionids * - * * * Purpose: get functionids from trigger expression * * * * Parameters: trigger - [IN] the trigger * @@ -474,8 +456,6 @@ void zbx_db_trigger_get_functionids(const DB_TRIGGER *trigger, zbx_vector_uint64 } /****************************************************************************** * * - * Function: zbx_db_trigger_get_constant * - * * * Purpose: get trigger expression constant at the specified location * * * * Parameters: trigger - [IN] the trigger * @@ -503,8 +483,6 @@ int zbx_db_trigger_get_constant(const DB_TRIGGER *trigger, int index, char **out /****************************************************************************** * * - * Function: zbx_db_trigger_get_itemid * - * * * Purpose: get the Nth function item from trigger expression * * * * Parameters: trigger - [IN] the trigger * @@ -567,8 +545,6 @@ int zbx_db_trigger_get_itemid(const DB_TRIGGER *trigger, int index, zbx_uint64_t /****************************************************************************** * * - * Function: zbx_db_trigger_get_itemids * - * * * Purpose: get unique itemids of trigger functions in the order at they are * * written in expression * * * @@ -636,8 +612,6 @@ void zbx_db_trigger_get_itemids(const DB_TRIGGER *trigger, zbx_vector_uint64_t * /****************************************************************************** * * - * Function: zbx_db_trigger_get_all_hostids * - * * * Purpose: get hostids from trigger expression and recovery expression * * * * Parameters: trigger - [IN] the trigger * @@ -662,8 +636,6 @@ int zbx_db_trigger_get_all_hostids(const DB_TRIGGER *trigger, const zbx_vector_u /****************************************************************************** * * - * Function: zbx_db_trigger_clean * - * * * Purpose: frees resources allocated to store trigger data * * * * Parameters: trigger - * @@ -685,8 +657,6 @@ void zbx_db_trigger_clean(DB_TRIGGER *trigger) /****************************************************************************** * * - * Function: db_trigger_get_expression * - * * * Purpose: get original trigger expression/recovery expression with expanded * * functions * * * @@ -780,8 +750,6 @@ static void db_trigger_get_expression(const zbx_eval_context_t *ctx, char **expr /****************************************************************************** * * - * Function: zbx_db_trigger_get_expression * - * * * Purpose: get original trigger expression with expanded functions * * * * Parameters: trigger - [IN] the trigger * @@ -800,8 +768,6 @@ void zbx_db_trigger_get_expression(const DB_TRIGGER *trigger, char **expression) /****************************************************************************** * * - * Function: zbx_db_trigger_get_recovery_expression * - * * * Purpose: get original trigger recovery expression with expanded functions * * * * Parameters: trigger - [IN] the trigger * diff --git a/src/libs/zbxdbhigh/trigger_dep_linking.c b/src/libs/zbxdbhigh/trigger_dep_linking.c index 6a3e679b0af..80b07f20421 100644 --- a/src/libs/zbxdbhigh/trigger_dep_linking.c +++ b/src/libs/zbxdbhigh/trigger_dep_linking.c @@ -110,8 +110,6 @@ static void zbx_triggers_dep_entries_clean(zbx_hashset_t *h) /********************************************************************************* * * - * Function: DBresolve_template_trigger_dependencies * - * * * Purpose: resolves trigger dependencies for the specified triggers based on * * host and linked templates * * * @@ -270,8 +268,6 @@ clean: /********************************************************************************************************** * * - * Function: prepare_trigger_dependencies_updates_and_deletes * - * * * Purpose: takes a list of pending trigger dependencies (links) and excludes entries that are * * already present on the target host to generate a new list (links_processed). Also, prepare * * the list of the trigger dependencies (trigger_dep_ids_del) that need to be deleted on the * @@ -521,8 +517,6 @@ clean: /******************************************************************************** * * - * Function: DBsync_template_dependencies_for_triggers * - * * * Purpose: update trigger dependencies for specified host * * * * Parameters: hostid - [IN] host identifier from database * diff --git a/src/libs/zbxdbhigh/trigger_linking.c b/src/libs/zbxdbhigh/trigger_linking.c index fe64c7e4f1a..c00e8a6e7ee 100644 --- a/src/libs/zbxdbhigh/trigger_linking.c +++ b/src/libs/zbxdbhigh/trigger_linking.c @@ -290,8 +290,6 @@ static void trigger_tag_insert_temp_free(zbx_trigger_tag_insert_temp_t *trigger_ /******************************************************************************** * * - * Function: DBcopy_template_trigger_tags * - * * * Purpose: copies tags from template triggers to created/linked triggers * * * * Parameters: new_triggerids - the created trigger ids * @@ -1364,8 +1362,6 @@ static void trigger_copies_free(zbx_trigger_copy_t *trigger_copy) /******************************************************************************** * * - * Function: DBcopy_template_triggers * - * * * Purpose: Copy template triggers to host * * * * Parameters: hostid - [IN] host identifier from database * diff --git a/src/libs/zbxdbupgrade/dbupgrade.c b/src/libs/zbxdbupgrade/dbupgrade.c index 8c8f77ee255..f5fccf95126 100644 --- a/src/libs/zbxdbupgrade/dbupgrade.c +++ b/src/libs/zbxdbupgrade/dbupgrade.c @@ -136,8 +136,6 @@ zbx_oracle_column_type_t; /****************************************************************************** * * - * Function: zbx_oracle_column_type * - * * * Purpose: determine whether column type is character or numeric * * * * Parameters: field_type - [IN] column type in Zabbix definitions * diff --git a/src/libs/zbxdbupgrade/dbupgrade_2010.c b/src/libs/zbxdbupgrade/dbupgrade_2010.c index 92de56972b3..cd765e97cc8 100644 --- a/src/libs/zbxdbupgrade/dbupgrade_2010.c +++ b/src/libs/zbxdbupgrade/dbupgrade_2010.c @@ -44,8 +44,6 @@ static int DBmodify_proxy_table_id_field(const char *table_name) /********************************************************************************* * * - * Function: parse_db_monitor_item_params * - * * * Purpose: parse database monitor item params string "user=<user> password= * * <passsword> DSN=<dsn> sql=<sql>" into parameter values. * * * @@ -1669,8 +1667,6 @@ static int DBpatch_2010194(void) /****************************************************************************** * * - * Function: DBpatch_2010195_replace_key_param_cb * - * * * Comments: auxiliary function for DBpatch_2010195() * * * ******************************************************************************/ diff --git a/src/libs/zbxdbupgrade/dbupgrade_2030.c b/src/libs/zbxdbupgrade/dbupgrade_2030.c index 3dd0ab17f1f..2dc32098f97 100644 --- a/src/libs/zbxdbupgrade/dbupgrade_2030.c +++ b/src/libs/zbxdbupgrade/dbupgrade_2030.c @@ -971,8 +971,6 @@ static int DBpatch_2030094(void) /****************************************************************************** * * - * Function: parse_function * - * * * Purpose: return function and function parameters * * func(param,...) * * * diff --git a/src/libs/zbxdbupgrade/dbupgrade_3010.c b/src/libs/zbxdbupgrade/dbupgrade_3010.c index 52107c91e78..6d6ef2e23f7 100644 --- a/src/libs/zbxdbupgrade/dbupgrade_3010.c +++ b/src/libs/zbxdbupgrade/dbupgrade_3010.c @@ -242,8 +242,6 @@ static int DBpatch_3010021_trigger_events_compare_func(const void *d1, const voi /****************************************************************************** * * - * Function: DBpatch_3010021_update_event_recovery * - * * * Purpose: set events.r_eventid field with corresponding recovery event id * * * * Parameters: events - [IN/OUT] unrecovered events indexed by triggerid * @@ -446,8 +444,6 @@ out: /****************************************************************************** * * - * Function: DBpatch_3010024_validate_action * - * * * Purpose: checks if the action must be disabled or its operations converted * * to recovery operations * * * @@ -676,8 +672,6 @@ static int DBpatch_3010025(void) /****************************************************************************** * * - * Function: DBpatch_3010026_get_conditionids * - * * * Purpose: get success condition identifiers * * * * Parameters: actionid - [IN] the action identifier * @@ -757,8 +751,6 @@ static void DBpatch_3010026_get_conditionids(zbx_uint64_t actionid, const char * /****************************************************************************** * * - * Function: DBpatch_3010026_expression_skip_whitespace * - * * * Purpose: skips whitespace characters * * * * Parameters: expression - [IN] the expression to process * @@ -777,8 +769,6 @@ static size_t DBpatch_3010026_expression_skip_whitespace(const char *expression, /****************************************************************************** * * - * Function: DBpatch_3010026_expression_get_token * - * * * Purpose: gets the next expression token starting with offset * * * * Parameters: expression - [IN] the expression to process * @@ -841,8 +831,6 @@ static int DBpatch_3010026_expression_get_token(const char *expression, int offs /****************************************************************************** * * - * Function: DBpatch_3010026_expression_validate_value * - * * * Purpose: checks if the value does not match any filter value * * * * Parameters: expression - [IN] the expression to process * @@ -869,8 +857,6 @@ static int DBpatch_3010026_expression_validate_value(const char *expression, zbx /****************************************************************************** * * - * Function: DBpatch_3010026_expression_cut_substring * - * * * Purpose: cuts substring from the expression * * * * Parameters: expression - [IN] the expression to process * @@ -885,8 +871,6 @@ static void DBpatch_3010026_expression_cut_substring(char *expression, zbx_strlo /****************************************************************************** * * - * Function: DBpatch_3010026_expression_move_location * - * * * Purpose: location by the specified offset * * * * Parameters: location - [IN] the location to adjust * @@ -901,8 +885,6 @@ static void DBpatch_3010026_expression_move_location(zbx_strloc_t *location, int /****************************************************************************** * * - * Function: DBpatch_3010026_expression_remove_values_impl * - * * * Purpose: removes values specified in filter from the location * * * * Parameters: expression - [IN] the expression to process * @@ -1014,8 +996,6 @@ static int DBpatch_3010026_expression_remove_values_impl(char *expression, zbx_s /****************************************************************************** * * - * Function: DBpatch_3010026_expression_remove_values * - * * * Purpose: removes values specified in filter from the location * * * * Parameters: expression - [IN] the expression to process * diff --git a/src/libs/zbxdbupgrade/dbupgrade_4050.c b/src/libs/zbxdbupgrade/dbupgrade_4050.c index 69db06f7a54..b332bf197ac 100644 --- a/src/libs/zbxdbupgrade/dbupgrade_4050.c +++ b/src/libs/zbxdbupgrade/dbupgrade_4050.c @@ -813,8 +813,6 @@ static int db_snmp_new_if_find(const dbu_snmp_if_t *snmp, const zbx_vector_dbu_s /****************************************************************************** * * - * Function: DBpatch_load_data * - * * * Purpose: loading a set of unique combination of snmp data within a single * * interface and associated interface data * * * @@ -1141,8 +1139,6 @@ static int DBpatch_items_type_update(void) /****************************************************************************** * * - * Function: DBpatch_4050046 * - * * * Purpose: migration snmp data from 'items' table to 'interface_snmp' new * * table linked with 'interface' table, except interface links for * * discovered hosts and parent host interface * @@ -1252,8 +1248,6 @@ static void db_if_link(zbx_uint64_t if_slave, zbx_uint64_t if_master, zbx_vector /****************************************************************************** * * - * Function: DBpatch_if_load_data * - * * * Purpose: loading all unlinked interfaces, snmp data and hostid of host * * prototype for discovered hosts * * * @@ -1384,8 +1378,6 @@ static int DBpatch_interface_discovery_save(zbx_vector_uint64_pair_t *if_links) /****************************************************************************** * * - * Function: DBpatch_4050047 * - * * * Purpose: recovery links between the interfaceid of discovered host and * * parent interfaceid from parent host * * * diff --git a/src/libs/zbxdbupgrade/dbupgrade_5030.c b/src/libs/zbxdbupgrade/dbupgrade_5030.c index e8158aef797..8ad0f24f0d1 100644 --- a/src/libs/zbxdbupgrade/dbupgrade_5030.c +++ b/src/libs/zbxdbupgrade/dbupgrade_5030.c @@ -1067,8 +1067,6 @@ static int DBpatch_5030065(void) /****************************************************************************** * * - * Function: DBpatch_5030066 (part of ZBXNEXT-6368) * - * * * Purpose: set value for 'scripts' table column 'scope' for existing global * * scripts * * * @@ -1120,8 +1118,6 @@ static char *zbx_rename_host_macros(const char *command) /****************************************************************************** * * - * Function: DBpatch_5030067 (part of ZBXNEXT-6368) * - * * * Purpose: rename some {HOST.*} macros to {HOST.TARGET.*} in existing global * * scripts which are used in actions * * * @@ -1171,8 +1167,6 @@ static int DBpatch_5030067(void) /****************************************************************************** * * - * Function: zbx_split_name (part of ZBXNEXT-6368) * - * * * Purpose: helper function to split script name into menu_path and name * * * * Parameters: * @@ -1201,8 +1195,6 @@ static void zbx_split_name(const char *name, char **menu_path, const char **name /****************************************************************************** * * - * Function: zbx_make_script_name_unique (part of ZBXNEXT-6368) * - * * * Purpose: helper function to assist in making unique script names * * * * Parameters: * @@ -1264,8 +1256,6 @@ static int zbx_make_script_name_unique(const char *name, int *suffix, char **uni /****************************************************************************** * * - * Function: DBpatch_5030068 (part of ZBXNEXT-6368) * - * * * Purpose: split script name between 'menu_path' and 'name' columns for * * existing global scripts * * * @@ -1359,8 +1349,6 @@ ZBX_VECTOR_IMPL(opcommands, zbx_opcommand_rec_t) /****************************************************************************** * * - * Function: zbx_pack_record (part of ZBXNEXT-6368) * - * * * Purpose: helper function, packs parts of remote command into one memory * * chunk for efficient storing and comparing * * * @@ -1400,8 +1388,6 @@ static size_t zbx_pack_record(const zbx_opcommand_parts_t *parts, char **packed_ /****************************************************************************** * * - * Function: zbx_check_duplicate (part of ZBXNEXT-6368) * - * * * Purpose: checking if this remote command is a new one or a duplicate one * * and storing the assigned new global script id * * * @@ -1451,8 +1437,6 @@ static int zbx_check_duplicate(zbx_vector_opcommands_t *opcommands, /****************************************************************************** * * - * Function: DBpatch_5030069 (part of ZBXNEXT-6368) * - * * * Purpose: migrate remote commands from table 'opcommand' to table 'scripts' * * and convert them into global scripts * * * @@ -4530,8 +4514,6 @@ static void dbpatch_trigger_clear(zbx_dbpatch_trigger_t *trigger) /****************************************************************************** * * - * Function: dbpatch_update_expression * - * * * Purpose: replace {functionid} occurrences in expression with the specified * * replacement string * * * @@ -4585,8 +4567,6 @@ static int dbpatch_update_expression(char **expression, zbx_uint64_t functionid, /****************************************************************************** * * - * Function: dbpatch_update_trigger * - * * * Purpose: replace {functionid} occurrences in trigger expression and * * recovery expression with the specified replacement string * * * @@ -4608,8 +4588,6 @@ static void dbpatch_update_trigger(zbx_dbpatch_trigger_t *trigger, zbx_uint64_t /****************************************************************************** * * - * Function: dbpatch_find_function * - * * * Purpose: check if the expression contains specified functionid * * * ******************************************************************************/ @@ -4646,8 +4624,6 @@ static int dbpatch_find_function(const char *expression, zbx_uint64_t functionid /****************************************************************************** * * - * Function: dbpatch_get_function_location * - * * * Purpose: return function location mask (expression | recovery expression) * * * ******************************************************************************/ @@ -4669,8 +4645,6 @@ static unsigned char dbpatch_get_function_location(const zbx_dbpatch_trigger_t * /****************************************************************************** * * - * Function: dbpatch_convert_trigger * - * * * Purpose: convert trigger and its functions to use new expression syntax * * * * Parameters: trigger - [IN/OUT] the trigger data/updates * @@ -4992,8 +4966,6 @@ static int DBpatch_5030166(void) /****************************************************************************** * * - * Function: dbpatch_convert_expression_macro * - * * * Purpose: convert simple macros in expression macro {? } to function calls * * using new expression syntax * * * diff --git a/src/libs/zbxdbupgrade/dbupgrade_5050.c b/src/libs/zbxdbupgrade/dbupgrade_5050.c index d7b9aa959b6..fcf618cee10 100644 --- a/src/libs/zbxdbupgrade/dbupgrade_5050.c +++ b/src/libs/zbxdbupgrade/dbupgrade_5050.c @@ -659,8 +659,6 @@ static int DBpatch_5050067(void) /****************************************************************************** * * - * Function: DBpatch_5050068_calc_services_write_value * - * * * Purpose: calculate services.write value for the specified role * * * * Parameters: roleid - [IN] the role identifier * diff --git a/src/libs/zbxdbupgrade/dbupgrade_macros.c b/src/libs/zbxdbupgrade/dbupgrade_macros.c index ce9b16c7f3b..9de45f1c53d 100644 --- a/src/libs/zbxdbupgrade/dbupgrade_macros.c +++ b/src/libs/zbxdbupgrade/dbupgrade_macros.c @@ -48,8 +48,6 @@ ZBX_VECTOR_IMPL(strloc, zbx_strloc_t) /****************************************************************************** * * - * Function: str_rename_macro * - * * * Purpose: rename macros in the string * * * * Parameters: in - [IN] the input string * @@ -103,8 +101,6 @@ static int str_rename_macro(const char *in, const char *oldmacro, const char *ne /****************************************************************************** * * - * Function: db_rename_macro * - * * * Purpose: rename macro in the specified database fields * * * * Parameters: result - [IN] database query with fields to replace. First * @@ -358,8 +354,6 @@ static void dbpatch_update_func_bitand(zbx_dbpatch_function_t *function, const z /****************************************************************************** * * - * Function: dbpatch_strcpy_alloc_quoted * - * * * Purpose: quote and text to a buffer * * * * Parameters: str - [OUT] the output buffer * @@ -384,8 +378,6 @@ void dbpatch_strcpy_alloc_quoted(char **str, size_t *str_alloc, size_t *str_offs /****************************************************************************** * * - * Function: dbpatch_is_composite_constant * - * * * Purpose: check for composite (consisting of macro(s) + text) constant * * * * Parameters: str - [IN] the text to check * @@ -412,8 +404,6 @@ int dbpatch_is_composite_constant(const char *str) /****************************************************************************** * * - * Function: dbpatch_convert_params * - * * * Purpose: convert function parameters into new syntax * * * * Parameters: out - [OUT] the converted parameter string * @@ -577,8 +567,6 @@ void dbpatch_convert_params(char **out, const char *parameter, const zbx_vector_ /****************************************************************************** * * - * Function: dbpatch_parse_function_params * - * * * Purpose: parse function parameter string into parameter location vector * * * ******************************************************************************/ @@ -614,8 +602,6 @@ static void dbpatch_parse_function_params(const char *parameter, zbx_vector_strl /****************************************************************************** * * - * Function: dbpatch_convert_function * - * * * Purpose: convert function to new parameter syntax/order * * * * Parameters: function - [IN/OUT] the function to convert * @@ -838,8 +824,6 @@ void dbpatch_convert_function(zbx_dbpatch_function_t *function, char **replace, /****************************************************************************** * * - * Function: dbpatch_replace_functionids * - * * * Purpose: replace functionids {<index in functions vector>} in expression * * with their string format * * * @@ -900,8 +884,6 @@ static void dbpatch_replace_functionids(char **expression, const zbx_vector_ptr_ /****************************************************************************** * * - * Function: dbpatch_convert_simple_macro * - * * * Purpose: convert simple macro {host.key:func(params)} to the new syntax * * func(/host/key,params) * * * diff --git a/src/libs/zbxdiag/diag.c b/src/libs/zbxdiag/diag.c index a3e4997e0eb..97b4234e0ea 100644 --- a/src/libs/zbxdiag/diag.c +++ b/src/libs/zbxdiag/diag.c @@ -33,8 +33,6 @@ void diag_map_free(zbx_diag_map_t *map) /****************************************************************************** * * - * Function: diag_parse_request * - * * * Purpose: parse diagnostic section request having json format * * {"stats":[<field1>,<field2>,...], "top":{<field1>:<limit1>,...}} * * * @@ -133,8 +131,6 @@ out: /****************************************************************************** * * - * Function: diag_add_mem_stats * - * * * Purpose: add memory statistics to the json data * * * * Parameters: json - [IN/OUT] the json to update * @@ -185,8 +181,6 @@ void diag_add_mem_stats(struct zbx_json *json, const char *name, const zbx_mem_s /****************************************************************************** * * - * Function: diag_compare_pair_second_desc * - * * * Purpose: compare uint64 pairs by second value for descending sorting * * * ******************************************************************************/ @@ -204,8 +198,6 @@ static int diag_compare_pair_second_desc(const void *d1, const void *d2) /****************************************************************************** * * - * Function: diag_historycahe_add_items * - * * * Purpose: add history cache items diagnostic statistics to json * * * ******************************************************************************/ @@ -229,8 +221,6 @@ static void diag_historycache_add_items(struct zbx_json *json, const char *field /****************************************************************************** * * - * Function: diag_add_historycache_info * - * * * Purpose: add requested history cache diagnostic information to json data * * * * Parameters: jp - [IN] the request * @@ -349,8 +339,6 @@ int diag_add_historycache_info(const struct zbx_json_parse *jp, struct zbx_json /****************************************************************************** * * - * Function: diag_add_preproc_items * - * * * Purpose: add item top list to output json * * * * Parameters: json - [OUT] the output json * @@ -380,8 +368,6 @@ static void diag_add_preproc_items(struct zbx_json *json, const char *field, con /****************************************************************************** * * - * Function: diag_add_preproc_info * - * * * Purpose: add requested preprocessing diagnostic information to json data * * * * Parameters: jp - [IN] the request * @@ -503,8 +489,6 @@ static void zbx_json_addhex(struct zbx_json *j, const char *name, zbx_uint64_t v /****************************************************************************** * * - * Function: diag_add_locks_info * - * * * Purpose: add requested locks diagnostic information to json data * * * * Parameters: json - [IN/OUT] the json to update * @@ -547,8 +531,6 @@ void diag_add_locks_info(struct zbx_json *json) /****************************************************************************** * * - * Function: zbx_diag_get_info * - * * * Purpose: get diagnostic information * * * * Parameters: jp - [IN] the request * @@ -592,8 +574,6 @@ out: /****************************************************************************** * * - * Function: diag_add_section_request * - * * * Purpose: add default diagnostic section request * * * * Parameters: j - [OUT] the request json * @@ -624,8 +604,6 @@ static void diag_add_section_request(struct zbx_json *j, const char *section, .. /****************************************************************************** * * - * Function: diag_prepare_default_request * - * * * Purpose: prepare default diagnostic request for all sections * * * ******************************************************************************/ @@ -652,8 +630,6 @@ static void diag_prepare_default_request(struct zbx_json *j, unsigned int flags) /****************************************************************************** * * - * Function: diag_get_simple_values * - * * * Purpose: extract simple values in format <key1>:<value1> <key2>:<value2>...* * from the specified json location * * * @@ -688,8 +664,6 @@ static void diag_get_simple_values(const struct zbx_json_parse *jp, char **msg) /****************************************************************************** * * - * Function: diag_log_memory_info * - * * * Purpose: log shared memory information * * * * Parameters: jp - [IN] the section json * @@ -744,8 +718,6 @@ static void diag_log_memory_info(struct zbx_json_parse *jp, const char *field, c /****************************************************************************** * * - * Function: diag_log_top_view * - * * * Purpose: log top view * * * * Parameters: jp - [IN] the section json * @@ -785,8 +757,6 @@ static void diag_log_top_view(struct zbx_json_parse *jp, const char *field, cons /****************************************************************************** * * - * Function: diag_log_history_cache * - * * * Purpose: log history cache diagnostic information * * * ******************************************************************************/ @@ -810,8 +780,6 @@ static void diag_log_history_cache(struct zbx_json_parse *jp, char **out, size_t /****************************************************************************** * * - * Function: diag_log_value_cache * - * * * Purpose: log value cache diagnostic information * * * ******************************************************************************/ @@ -835,8 +803,6 @@ static void diag_log_value_cache(struct zbx_json_parse *jp, char **out, size_t * /****************************************************************************** * * - * Function: diag_log_preprocessing * - * * * Purpose: log preprocessing diagnostic information * * * ******************************************************************************/ @@ -858,8 +824,6 @@ static void diag_log_preprocessing(struct zbx_json_parse *jp, char **out, size_t /****************************************************************************** * * - * Function: diag_log_lld * - * * * Purpose: log LLD diagnostic information * * * ******************************************************************************/ @@ -881,8 +845,6 @@ static void diag_log_lld(struct zbx_json_parse *jp, char **out, size_t *out_allo /****************************************************************************** * * - * Function: diag_log_alerting * - * * * Purpose: log alerting diagnostic information * * * ******************************************************************************/ @@ -904,8 +866,6 @@ static void diag_log_alerting(struct zbx_json_parse *jp, char **out, size_t *out /****************************************************************************** * * - * Function: zbx_diag_log_info * - * * * Purpose: log diagnostic information * * * * Parameters: flags - [IN] flags describing section to log * diff --git a/src/libs/zbxdiag/diag_proxy.c b/src/libs/zbxdiag/diag_proxy.c index 9db17aa6543..f01bf97a60d 100644 --- a/src/libs/zbxdiag/diag_proxy.c +++ b/src/libs/zbxdiag/diag_proxy.c @@ -24,8 +24,6 @@ /****************************************************************************** * * - * Function: diag_add_section_info * - * * * Purpose: add requested section diagnostic information * * * * Parameters: section - [IN] the section name * diff --git a/src/libs/zbxdiag/diag_server.c b/src/libs/zbxdiag/diag_server.c index 9b2b04e46e2..f250162d530 100644 --- a/src/libs/zbxdiag/diag_server.c +++ b/src/libs/zbxdiag/diag_server.c @@ -29,8 +29,6 @@ /****************************************************************************** * * - * Function: diag_historycache_item_compare_values * - * * * Purpose: sort itemid,values_num pair by values_num in descending order * * * ******************************************************************************/ @@ -44,8 +42,6 @@ static int diag_valuecache_item_compare_values(const void *d1, const void *d2) /****************************************************************************** * * - * Function: diag_valuecache_item_compare_hourly * - * * * Purpose: sort itemid,values_num pair by hourly_num in descending order * * * ******************************************************************************/ @@ -59,8 +55,6 @@ static int diag_valuecache_item_compare_hourly(const void *d1, const void *d2) /****************************************************************************** * * - * Function: diag_valuecache_add_items * - * * * Purpose: add valuecache items diagnostic statistics to json * * * ******************************************************************************/ @@ -84,8 +78,6 @@ static void diag_valuecache_add_items(struct zbx_json *json, const char *field, /****************************************************************************** * * - * Function: diag_add_valuecache_info * - * * * Purpose: add requested value cache diagnostic information to json data * * * * Parameters: jp - [IN] the request * @@ -203,8 +195,6 @@ out: /****************************************************************************** * * - * Function: diag_add_lld_items * - * * * Purpose: add lld item top list to output json * * * ******************************************************************************/ @@ -227,8 +217,6 @@ static void diag_add_lld_items(struct zbx_json *json, const char *field, const z /****************************************************************************** * * - * Function: diag_add_lld_info * - * * * Purpose: add requested lld manager diagnostic information to json data * * * * Parameters: jp - [IN] the request * @@ -325,8 +313,6 @@ out: /****************************************************************************** * * - * Function: diag_add_alerting_mediatypes * - * * * Purpose: add mediatype top list to output json * * * * Parameters: json - [OUT] the output json * @@ -355,8 +341,6 @@ static void diag_add_alerting_mediatypes(struct zbx_json *json, const char *fiel /****************************************************************************** * * - * Function: diag_add_alerting_sources * - * * * Purpose: add alert source top list to output json * * * * Parameters: json - [OUT] the output json * @@ -388,8 +372,6 @@ static void diag_add_alerting_sources(struct zbx_json *json, const char *field, /****************************************************************************** * * - * Function: diag_add_alerting_info * - * * * Purpose: add requested alert manager diagnostic information to json data * * * * Parameters: jp - [IN] the request * @@ -504,8 +486,6 @@ out: /****************************************************************************** * * - * Function: diag_add_section_info * - * * * Purpose: add requested section diagnostic information * * * * Parameters: section - [IN] the section name * diff --git a/src/libs/zbxembed/console.c b/src/libs/zbxembed/console.c index 5a1e2fdd2ef..aef2bb821c1 100644 --- a/src/libs/zbxembed/console.c +++ b/src/libs/zbxembed/console.c @@ -27,8 +27,6 @@ /****************************************************************************** * * - * Function: es_console_dtor * - * * * Purpose: console destructor * * * ******************************************************************************/ @@ -41,8 +39,6 @@ static duk_ret_t es_console_dtor(duk_context *ctx) /****************************************************************************** * * - * Function: es_console_ctor * - * * * Purpose: console constructor * * * ******************************************************************************/ @@ -61,8 +57,6 @@ static duk_ret_t es_console_ctor(duk_context *ctx) /****************************************************************************** * * - * Function: es_log_message * - * * * Purpose: Write message to centralized Zabbix log * * * ******************************************************************************/ @@ -121,8 +115,6 @@ out: /****************************************************************************** * * - * Function: es_console_log * - * * * Purpose: console.log method * * * ******************************************************************************/ @@ -133,8 +125,6 @@ static duk_ret_t es_console_log(duk_context *ctx) /****************************************************************************** * * - * Function: es_console_warn * - * * * Purpose: console.warn method * * * ******************************************************************************/ @@ -145,8 +135,6 @@ static duk_ret_t es_console_warn(duk_context *ctx) /****************************************************************************** * * - * Function: es_console_error * - * * * Purpose: console.error method * * * ******************************************************************************/ diff --git a/src/libs/zbxembed/embed.c b/src/libs/zbxembed/embed.c index 8d7f682542e..55793aebee5 100644 --- a/src/libs/zbxembed/embed.c +++ b/src/libs/zbxembed/embed.c @@ -40,8 +40,6 @@ /****************************************************************************** * * - * Function: es_handle_error * - * * * Purpose: fatal error handler * * * ******************************************************************************/ @@ -123,8 +121,6 @@ static void es_free(void *udata, void *ptr) /****************************************************************************** * * - * Function: zbx_es_check_timeout * - * * * Purpose: timeout checking callback * * * ******************************************************************************/ @@ -140,8 +136,6 @@ int zbx_es_check_timeout(void *udata) /****************************************************************************** * * - * Function: zbx_es_init * - * * * Purpose: initializes embedded scripting engine * * * ******************************************************************************/ @@ -152,8 +146,6 @@ void zbx_es_init(zbx_es_t *es) /****************************************************************************** * * - * Function: zbx_es_destroy * - * * * Purpose: destroys embedded scripting engine * * * ******************************************************************************/ @@ -169,8 +161,6 @@ void zbx_es_destroy(zbx_es_t *es) /****************************************************************************** * * - * Function: zbx_es_init_env * - * * * Purpose: initializes embedded scripting engine environment * * * * Parameters: es - [IN] the embedded scripting engine * @@ -249,8 +239,6 @@ out: /****************************************************************************** * * - * Function: zbx_es_destroy_env * - * * * Purpose: destroys initialized embedded scripting engine environment * * * * Parameters: es - [IN] the embedded scripting engine * @@ -288,8 +276,6 @@ out: /****************************************************************************** * * - * Function: zbx_es_ready * - * * * Purpose: checks if the scripting engine environment is initialized * * * * Parameters: es - [IN] the embedded scripting engine * @@ -305,8 +291,6 @@ int zbx_es_is_env_initialized(zbx_es_t *es) /****************************************************************************** * * - * Function: zbx_es_fatal_error * - * * * Purpose: checks if fatal error has occurred * * * * Comments: Fatal error may put the scripting engine in unknown state, it's * @@ -330,8 +314,6 @@ int zbx_es_fatal_error(zbx_es_t *es) /****************************************************************************** * * - * Function: zbx_es_compile * - * * * Purpose: compiles script into bytecode * * * * Parameters: es - [IN] the embedded scripting engine * @@ -414,8 +396,6 @@ out: /****************************************************************************** * * - * Function: zbx_es_execute * - * * * Purpose: executes script * * * * Parameters: es - [IN] the embedded scripting engine * @@ -553,8 +533,6 @@ out: /****************************************************************************** * * - * Function: zbx_es_set_timeout * - * * * Purpose: sets script execution timeout * * * * Parameters: es - [IN] the embedded scripting engine * @@ -594,8 +572,6 @@ void zbx_es_debug_disable(zbx_es_t *es) /****************************************************************************** * * - * Function: zbx_es_execute_command * - * * * Purpose: executes command (script in form of a text) * * * * Parameters: command - [IN] the command in form of a text * diff --git a/src/libs/zbxembed/global.c b/src/libs/zbxembed/global.c index 58649e18e0f..097fc6c65f2 100644 --- a/src/libs/zbxembed/global.c +++ b/src/libs/zbxembed/global.c @@ -27,8 +27,6 @@ /****************************************************************************** * * - * Function: es_btoa * - * * * Purpose: encodes parameter to base64 string * * * * Parameters: ctx - [IN] pointer to duk_context * @@ -54,8 +52,6 @@ static duk_ret_t es_btoa(duk_context *ctx) /****************************************************************************** * * - * Function: es_atob * - * * * Purpose: decodes base64 string * * * * Parameters: ctx - [IN] pointer to duk_context * @@ -84,8 +80,6 @@ static duk_ret_t es_atob(duk_context *ctx) /****************************************************************************** * * - * Function: es_md5 * - * * * Purpose: compute a md5 checksum * * * * Parameters: ctx - [IN] pointer to duk_context * @@ -128,8 +122,6 @@ static duk_ret_t es_md5(duk_context *ctx) /****************************************************************************** * * - * Function: es_sha256 * - * * * Purpose: compute a sha256 checksum * * * * Parameters: ctx - [IN] pointer to duk_context * @@ -167,8 +159,6 @@ static duk_ret_t es_sha256(duk_context *ctx) /****************************************************************************** * * - * Function: es_init_global_functions * - * * * Purpose: initializes additional global functions * * * * Parameters: es - [IN] the embedded scripting engine * diff --git a/src/libs/zbxembed/httprequest.c b/src/libs/zbxembed/httprequest.c index 22111dfb07d..9286e8f56b5 100644 --- a/src/libs/zbxembed/httprequest.c +++ b/src/libs/zbxembed/httprequest.c @@ -89,8 +89,6 @@ static size_t curl_header_cb(void *ptr, size_t size, size_t nmemb, void *userdat /****************************************************************************** * * - * Function: es_httprequest * - * * * Purpose: return backing C structure embedded in CurlHttpRequest object * * * ******************************************************************************/ @@ -108,8 +106,6 @@ static zbx_es_httprequest_t *es_httprequest(duk_context *ctx) /****************************************************************************** * * - * Function: es_httprequest_dtor * - * * * Purpose: CurlHttpRequest destructor * * * ******************************************************************************/ @@ -138,8 +134,6 @@ static duk_ret_t es_httprequest_dtor(duk_context *ctx) /****************************************************************************** * * - * Function: es_httprequest_ctor * - * * * Purpose: CurlHttpRequest constructor * * * ******************************************************************************/ @@ -204,8 +198,6 @@ out: /****************************************************************************** * * - * Function: es_httprequest_add_header * - * * * Purpose: CurlHttpRequest.SetHeader method * * * ******************************************************************************/ @@ -239,8 +231,6 @@ out: /****************************************************************************** * * - * Function: es_httprequest_clear_header * - * * * Purpose: CurlHttpRequest.ClearHeader method * * * ******************************************************************************/ @@ -260,8 +250,6 @@ static duk_ret_t es_httprequest_clear_header(duk_context *ctx) /****************************************************************************** * * - * Function: es_httprequest_query * - * * * Purpose: CurlHttpRequest HTTP request implementation * * * * Parameters: ctx - [IN] the scripting engine context * @@ -346,8 +334,6 @@ out: /****************************************************************************** * * - * Function: es_httprequest_get * - * * * Purpose: HttpRequest.Get / CurlHttpRequest.Get method * * * ******************************************************************************/ @@ -358,8 +344,6 @@ static duk_ret_t es_httprequest_get(duk_context *ctx) /****************************************************************************** * * - * Function: es_httprequest_put * - * * * Purpose: HttpRequest.Put / CurlHttpRequest.Put method * * * ******************************************************************************/ @@ -370,8 +354,6 @@ static duk_ret_t es_httprequest_put(duk_context *ctx) /****************************************************************************** * * - * Function: es_httprequest_post * - * * * Purpose: HttpRequest.Post / CurlHttpRequest.Post method * * * ******************************************************************************/ @@ -382,8 +364,6 @@ static duk_ret_t es_httprequest_post(duk_context *ctx) /****************************************************************************** * * - * Function: es_httprequest_delete * - * * * Purpose: HttpRequest.Delete / CurlHttpRequest.Delete method * * * ******************************************************************************/ @@ -394,8 +374,6 @@ static duk_ret_t es_httprequest_delete(duk_context *ctx) /****************************************************************************** * * - * Function: es_httprequest_head * - * * * Purpose: HttpRequest.head method * * * ******************************************************************************/ @@ -406,8 +384,6 @@ static duk_ret_t es_httprequest_head(duk_context *ctx) /****************************************************************************** * * - * Function: es_httprequest_patch * - * * * Purpose: HttpRequest.patch method * * * ******************************************************************************/ @@ -418,8 +394,6 @@ static duk_ret_t es_httprequest_patch(duk_context *ctx) /****************************************************************************** * * - * Function: es_httprequest_options * - * * * Purpose: HttpRequest.options method * * * ******************************************************************************/ @@ -430,8 +404,6 @@ static duk_ret_t es_httprequest_options(duk_context *ctx) /****************************************************************************** * * - * Function: es_httprequest_trace * - * * * Purpose: HttpRequest.trace method * * * ******************************************************************************/ @@ -442,8 +414,6 @@ static duk_ret_t es_httprequest_trace(duk_context *ctx) /****************************************************************************** * * - * Function: es_httprequest_connect * - * * * Purpose: HttpRequest.connect method * * * ******************************************************************************/ @@ -454,8 +424,6 @@ static duk_ret_t es_httprequest_connect(duk_context *ctx) /****************************************************************************** * * - * Function: es_httprequest_customrequest * - * * * Purpose: HttpRequest.customRequest method * * * ******************************************************************************/ @@ -474,8 +442,6 @@ static duk_ret_t es_httprequest_customrequest(duk_context *ctx) /****************************************************************************** * * - * Function: es_httprequest_set_proxy * - * * * Purpose: CurlHttpRequest.SetProxy method * * * ******************************************************************************/ @@ -498,8 +464,6 @@ out: /****************************************************************************** * * - * Function: es_httprequest_status * - * * * Purpose: CurlHttpRequest.Status method * * * ******************************************************************************/ @@ -522,8 +486,6 @@ static duk_ret_t es_httprequest_status(duk_context *ctx) /****************************************************************************** * * - * Function: parse_header * - * * * Purpose: retrieves value of a header * * * * Parameters: header - [IN] the http header to extract value from * @@ -548,8 +510,6 @@ static int parse_header(char *header, char **value_out) /****************************************************************************** * * - * Function: es_obj_put_http_header * - * * * Purpose: puts http header <field>: <value> as object property/value * * * * Parameters: ctx - [IN] the duktape context * @@ -572,8 +532,6 @@ static void es_put_header(duk_context *ctx, int idx, char *header) /****************************************************************************** * * - * Function: get_headers_as_strings * - * * * Purpose: retrieve headers from request in form of strings * * * * Parameters: ctx - [IN] the duktape context * @@ -616,8 +574,6 @@ static void cached_headers_free(zbx_cached_header_t *header) /****************************************************************************** * * - * Function: get_headers_as_arrays * - * * * Purpose: retrieve headers from request in form of arrays * * * * Parameters: ctx - [IN] the duktape context * @@ -699,8 +655,6 @@ out: /****************************************************************************** * * - * Function: es_httprequest_get_headers * - * * * Purpose: HttpRequest.getHeaders / CurlHttpRequest.GetHeaders method * * * ******************************************************************************/ @@ -726,8 +680,6 @@ static duk_ret_t es_httprequest_get_headers(duk_context *ctx) /****************************************************************************** * * - * Function: es_httprequest_set_httpauth * - * * * Purpose: CurlHttpRequest.SetHttpAuth method * * * ******************************************************************************/ diff --git a/src/libs/zbxembed/xml.c b/src/libs/zbxembed/xml.c index 55a604b3da8..322b01ce1e2 100644 --- a/src/libs/zbxembed/xml.c +++ b/src/libs/zbxembed/xml.c @@ -25,8 +25,6 @@ /****************************************************************************** * * - * Function: es_xml_ctor * - * * * Purpose: XML constructor * * * ******************************************************************************/ @@ -44,8 +42,6 @@ static duk_ret_t es_xml_ctor(duk_context *ctx) /****************************************************************************** * * - * Function: es_xml_query * - * * * Purpose: XML.query method * * * ******************************************************************************/ @@ -75,8 +71,6 @@ out: /****************************************************************************** * * - * Function: es_xml_from_json * - * * * Purpose: XML.fromJson method * * * ******************************************************************************/ @@ -103,8 +97,6 @@ out: /****************************************************************************** * * - * Function: es_xml_to_json * - * * * Purpose: XML.toJson method * * * ******************************************************************************/ @@ -156,8 +148,6 @@ static int es_xml_create_object(duk_context *ctx) /****************************************************************************** * * - * Function: zbx_es_init_xml * - * * * Purpose: init XML object * * * ******************************************************************************/ diff --git a/src/libs/zbxembed/zabbix.c b/src/libs/zbxembed/zabbix.c index ceadfd8d213..a6fca933635 100644 --- a/src/libs/zbxembed/zabbix.c +++ b/src/libs/zbxembed/zabbix.c @@ -27,8 +27,6 @@ /****************************************************************************** * * - * Function: es_zabbix_dtor * - * * * Purpose: Zabbix destructor * * * ******************************************************************************/ @@ -41,8 +39,6 @@ static duk_ret_t es_zabbix_dtor(duk_context *ctx) /****************************************************************************** * * - * Function: es_zabbix_ctor * - * * * Purpose: Zabbix constructor * * * ******************************************************************************/ @@ -61,8 +57,6 @@ static duk_ret_t es_zabbix_ctor(duk_context *ctx) /****************************************************************************** * * - * Function: es_zabbix_status * - * * * Purpose: Zabbix.Status method * * * ******************************************************************************/ diff --git a/src/libs/zbxeval/calc.c b/src/libs/zbxeval/calc.c index faee357fe28..207bc24d477 100644 --- a/src/libs/zbxeval/calc.c +++ b/src/libs/zbxeval/calc.c @@ -42,8 +42,6 @@ static int zbx_is_normal_double(double dbl) /****************************************************************************** * * - * Function: calc_arithmetic_mean * - * * * Purpose: calculate arithmetic mean (i.e. average) * * * * Parameters: v - [IN] non-empty vector with input data * @@ -64,8 +62,6 @@ static double calc_arithmetic_mean(const zbx_vector_dbl_t *v) /****************************************************************************** * * - * Function: zbx_eval_calc_kurtosis * - * * * Purpose: evaluate function 'kurtosis' * * * * Parameters: values - [IN] non-empty vector with input data * @@ -123,8 +119,6 @@ err: /****************************************************************************** * * - * Function: find_median * - * * * Purpose: find median (helper function) * * * * Parameters: v - [IN/OUT] non-empty vector with input data. * @@ -145,8 +139,6 @@ static double find_median(zbx_vector_dbl_t *v) /****************************************************************************** * * - * Function: zbx_eval_calc_mad * - * * * Purpose: calculate 'median absolute deviation' * * * * Parameters: values - [IN] non-empty vector with input data. * @@ -192,8 +184,6 @@ err: /****************************************************************************** * * - * Function: zbx_eval_calc_skewness * - * * * Purpose: evaluate 'skewness' function * * * * Parameters: values - [IN] non-empty vector with input data * @@ -245,8 +235,6 @@ err: /****************************************************************************** * * - * Function: zbx_eval_calc_stddevpop * - * * * Purpose: evaluate function 'stdevpop' (population standard deviation) * * * * Parameters: values - [IN] non-empty vector with input data * @@ -297,8 +285,6 @@ err: /****************************************************************************** * * - * Function: zbx_eval_calc_stddevsamp * - * * * Purpose: evaluate function 'stddevsamp' (sample standard deviation) * * * * Parameters: values - [IN] vector with input data with at least 2 elements * @@ -355,8 +341,6 @@ err: /****************************************************************************** * * - * Function: zbx_eval_calc_sumofsquares * - * * * Purpose: calculate sum of squares * * * * Parameters: values - [IN] non-empty vector with input data * @@ -388,8 +372,6 @@ int zbx_eval_calc_sumofsquares(zbx_vector_dbl_t *values, double *result, char ** /****************************************************************************** * * - * Function: zbx_eval_calc_varpop * - * * * Purpose: evaluate function 'varpop' (population variance) * * * * Parameters: values - [IN] non-empty vector with input data * @@ -439,8 +421,6 @@ err: /****************************************************************************** * * - * Function: zbx_eval_calc_varsamp * - * * * Purpose: evaluate function 'varsamp' (sample variance) * * * * Parameters: values - [IN] non-empty vector with input data * @@ -537,8 +517,6 @@ static void ensure_histogram_monotonic(zbx_vector_histogram_t *h) /****************************************************************************** * * - * Function: zbx_eval_calc_histogram_quantile * - * * * Purpose: calculate histogram quantile base on vector, where odd position * * is bucket upper bound ('le') and even position is 'rate' value * * * @@ -660,8 +638,6 @@ err: /****************************************************************************** * * - * Function: zbx_eval_calc_avg * - * * * Purpose: evaluate function avg * * * * Parameters: values - [IN] non-empty vector with input data * @@ -687,8 +663,6 @@ int zbx_eval_calc_avg(zbx_vector_dbl_t *values, double *result, char **error) /****************************************************************************** * * - * Function: zbx_eval_calc_min * - * * * Purpose: evaluate function min * * * * Parameters: values - [IN] non-empty vector with input data * @@ -725,8 +699,6 @@ int zbx_eval_calc_min(zbx_vector_dbl_t *values, double *result, char **error) /****************************************************************************** * * - * Function: zbx_eval_calc_max * - * * * Purpose: evaluate function max * * * * Parameters: values - [IN] non-empty vector with input data * @@ -763,8 +735,6 @@ int zbx_eval_calc_max(zbx_vector_dbl_t *values, double *result, char **error) /****************************************************************************** * * - * Function: zbx_eval_calc_sum * - * * * Purpose: evaluate function sum * * * * Parameters: values - [IN] non-empty vector with input data * diff --git a/src/libs/zbxeval/execute.c b/src/libs/zbxeval/execute.c index 4fad1a013ce..fe72f4bca5b 100644 --- a/src/libs/zbxeval/execute.c +++ b/src/libs/zbxeval/execute.c @@ -48,8 +48,6 @@ zbx_function_trim_optype_t; /****************************************************************************** * * - * Function: variant_convert_suffixed_num * - * * * Purpose: convert variant string value containing suffixed number to * * floating point variant value * * * @@ -83,8 +81,6 @@ static int variant_convert_suffixed_num(zbx_variant_t *value, const zbx_variant_ /****************************************************************************** * * - * Function: eval_execute_op_unary * - * * * Purpose: evaluate unary operator * * * * Parameters: ctx - [IN] the evaluation context * @@ -151,8 +147,6 @@ static int eval_execute_op_unary(const zbx_eval_context_t *ctx, const zbx_eval_t /****************************************************************************** * * - * Function: eval_execute_op_logic_err * - * * * Purpose: evaluate logical or/and operator with one operand being error * * * * Parameters: token - [IN] the operator token * @@ -200,8 +194,6 @@ static int eval_execute_op_logic_err(const zbx_eval_token_t *token, const zbx_va /****************************************************************************** * * - * Function: eval_variant_compare * - * * * Purpose: compare two variant values supporting suffixed numbers * * * * Return value: <0 - the first value is less than the second * @@ -233,8 +225,6 @@ static int eval_variant_compare(const zbx_variant_t *left, const zbx_variant_t * /****************************************************************************** * * - * Function: eval_execute_op_binary * - * * * Purpose: evaluate binary operator * * * * Parameters: ctx - [IN] the evaluation context * @@ -408,8 +398,6 @@ finish: /****************************************************************************** * * - * Function: eval_suffixed_number_parse * - * * * Purpose: check if the value is suffixed number and return the suffix if * * exists * * * @@ -441,8 +429,6 @@ int eval_suffixed_number_parse(const char *value, char *suffix) /****************************************************************************** * * - * Function: eval_execute_push_value * - * * * Purpose: push value in output stack * * * * Parameters: ctx - [IN] the evaluation context * @@ -527,8 +513,6 @@ static int eval_execute_push_value(const zbx_eval_context_t *ctx, const zbx_eval /****************************************************************************** * * - * Function: eval_execute_push_null * - * * * Purpose: push null value in output stack * * * * Parameters: output - [IN/OUT] the output value stack * @@ -544,8 +528,6 @@ static void eval_execute_push_null(zbx_vector_var_t *output) /****************************************************************************** * * - * Function: eval_compare_token * - * * * Purpose: check if expression fragment matches the specified text * * * * Parameters: ctx - [IN] the evaluation context * @@ -571,8 +553,6 @@ int eval_compare_token(const zbx_eval_context_t *ctx, const zbx_strloc_t *loc, c /****************************************************************************** * * - * Function: eval_function_return * - * * * Purpose: handle function return * * * * Parameters: args_num - [IN] the number of function arguments * @@ -597,8 +577,6 @@ static void eval_function_return(zbx_uint32_t args_num, zbx_variant_t *value, zb /****************************************************************************** * * - * Function: eval_validate_function_args * - * * * Purpose: validate function arguments * * * * Parameters: ctx - [IN] the evaluation context * @@ -661,8 +639,6 @@ static const char *eval_type_desc(unsigned char type) /****************************************************************************** * * - * Function: eval_convert_function_arg * - * * * Purpose: convert function argument to the specified type * * * * Parameters: ctx - [IN] the evaluation context * @@ -698,8 +674,6 @@ static int eval_convert_function_arg(const zbx_eval_context_t *ctx, const zbx_ev /****************************************************************************** * * - * Function: eval_prepare_math_function_args * - * * * Purpose: validate and prepare (convert to floating values) math function * * arguments * * * @@ -767,8 +741,6 @@ static int eval_prepare_math_function_args(const zbx_eval_context_t *ctx, const /****************************************************************************** * * - * Function: eval_execute_function_min * - * * * Purpose: evaluate min() function * * * * Parameters: ctx - [IN] the evaluation context * @@ -823,8 +795,6 @@ static int eval_execute_function_min(const zbx_eval_context_t *ctx, const zbx_ev /****************************************************************************** * * - * Function: eval_execute_function_max * - * * * Purpose: evaluate max() function * * * * Parameters: ctx - [IN] the evaluation context * @@ -879,8 +849,6 @@ static int eval_execute_function_max(const zbx_eval_context_t *ctx, const zbx_ev /****************************************************************************** * * - * Function: eval_execute_function_sum * - * * * Purpose: evaluate sum() function * * * * Parameters: ctx - [IN] the evaluation context * @@ -925,8 +893,6 @@ static int eval_execute_function_sum(const zbx_eval_context_t *ctx, const zbx_ev /****************************************************************************** * * - * Function: eval_execute_function_avg * - * * * Purpose: evaluate avg() function * * * * Parameters: ctx - [IN] the evaluation context * @@ -975,8 +941,6 @@ static int eval_execute_function_avg(const zbx_eval_context_t *ctx, const zbx_ev /****************************************************************************** * * - * Function: eval_execute_function_abs * - * * * Purpose: evaluate abs() function * * * * Parameters: ctx - [IN] the evaluation context * @@ -1013,8 +977,6 @@ static int eval_execute_function_abs(const zbx_eval_context_t *ctx, const zbx_ev /****************************************************************************** * * - * Function: eval_execute_function_length * - * * * Purpose: evaluate length() function * * * * Parameters: ctx - [IN] the evaluation context * @@ -1055,8 +1017,6 @@ static int eval_execute_function_length(const zbx_eval_context_t *ctx, const zbx /****************************************************************************** * * - * Function: eval_execute_function_date * - * * * Purpose: evaluate date() function * * * * Parameters: ctx - [IN] the evaluation context * @@ -1097,8 +1057,6 @@ static int eval_execute_function_date(const zbx_eval_context_t *ctx, const zbx_e /****************************************************************************** * * - * Function: eval_execute_function_time * - * * * Purpose: evaluate time() function * * * * Parameters: ctx - [IN] the evaluation context * @@ -1138,8 +1096,6 @@ static int eval_execute_function_time(const zbx_eval_context_t *ctx, const zbx_e } /****************************************************************************** * * - * Function: eval_execute_function_now * - * * * Purpose: evaluate now() function * * * * Parameters: ctx - [IN] the evaluation context * @@ -1170,8 +1126,6 @@ static int eval_execute_function_now(const zbx_eval_context_t *ctx, const zbx_ev } /****************************************************************************** * * - * Function: eval_execute_function_dayofweek * - * * * Purpose: evaluate dayofweek() function * * * * Parameters: ctx - [IN] the evaluation context * @@ -1212,8 +1166,6 @@ static int eval_execute_function_dayofweek(const zbx_eval_context_t *ctx, const /****************************************************************************** * * - * Function: eval_execute_function_dayofmonth * - * * * Purpose: evaluate dayofmonth() function * * * * Parameters: ctx - [IN] the evaluation context * @@ -1254,8 +1206,6 @@ static int eval_execute_function_dayofmonth(const zbx_eval_context_t *ctx, const /****************************************************************************** * * - * Function: eval_execute_function_bitwise * - * * * Purpose: evaluate bitand(), bitor(), bitxor(), bitlshift(), * * bitrshift() functions * * * @@ -1319,8 +1269,6 @@ static int eval_execute_function_bitwise(const zbx_eval_context_t *ctx, const zb /****************************************************************************** * * - * Function: eval_execute_function_bitnot * - * * * Purpose: evaluate bitnot() function * * * * Parameters: ctx - [IN] the evaluation context * @@ -1361,8 +1309,6 @@ static int eval_execute_function_bitnot(const zbx_eval_context_t *ctx, const zbx /****************************************************************************** * * - * Function: eval_execute_function_left * - * * * Purpose: evaluate left() function * * * * Parameters: ctx - [IN] the evaluation context * @@ -1447,8 +1393,6 @@ static int eval_validate_statistical_function_args(const zbx_eval_context_t *ctx /****************************************************************************** * * - * Function: eval_execute_statistical_function * - * * * Purpose: common operations for aggregate function calculation * * * * Parameters: ctx - [IN] the evaluation context * @@ -1485,8 +1429,6 @@ static int eval_execute_statistical_function(const zbx_eval_context_t *ctx, cons /****************************************************************************** * * - * Function: eval_execute_function_right * - * * * Purpose: evaluate right() function * * * * Parameters: ctx - [IN] the evaluation context * @@ -1545,8 +1487,6 @@ static int eval_execute_function_right(const zbx_eval_context_t *ctx, const zbx_ /****************************************************************************** * * - * Function: eval_execute_function_mid * - * * * Purpose: evaluate mid() function * * * * Parameters: ctx - [IN] the evaluation context * @@ -1615,8 +1555,6 @@ static int eval_execute_function_mid(const zbx_eval_context_t *ctx, const zbx_ev /****************************************************************************** * * - * Function: eval_execute_function_trim * - * * * Purpose: evaluate trim(), rtrim(), ltrim() functions * * * * Parameters: ctx - [IN] the evaluation context * @@ -1688,8 +1626,6 @@ static int eval_execute_function_trim(const zbx_eval_context_t *ctx, const zbx_e /****************************************************************************** * * - * Function: eval_execute_function_concat * - * * * Purpose: evaluate concat() function * * * * Parameters: ctx - [IN] the evaluation context * @@ -1736,8 +1672,6 @@ static int eval_execute_function_concat(const zbx_eval_context_t *ctx, const zbx /****************************************************************************** * * - * Function: eval_execute_function_insert * - * * * Purpose: evaluate insert() function * * * * Parameters: ctx - [IN] the evaluation context * @@ -1812,8 +1746,6 @@ static int eval_execute_function_insert(const zbx_eval_context_t *ctx, const zbx /****************************************************************************** * * - * Function: eval_execute_function_replace * - * * * Purpose: evaluate replace() function * * * * Parameters: ctx - [IN] the evaluation context * @@ -1879,8 +1811,6 @@ static int eval_execute_function_replace(const zbx_eval_context_t *ctx, const zb /****************************************************************************** * * - * Function: eval_execute_function_repeat * - * * * Purpose: evaluate repeat() function * * * * Parameters: ctx - [IN] the evaluation context * @@ -1943,8 +1873,6 @@ static int eval_execute_function_repeat(const zbx_eval_context_t *ctx, const zbx /****************************************************************************** * * - * Function: eval_execute_function_bytelength * - * * * Purpose: evaluate bytelength() function * * * * Parameters: ctx - [IN] the evaluation context * @@ -2004,8 +1932,6 @@ static int eval_execute_function_bytelength(const zbx_eval_context_t *ctx, const /****************************************************************************** * * - * Function: eval_execute_function_bitlength * - * * * Purpose: evaluate bitlength() function * * * * Parameters: ctx - [IN] the evaluation context * @@ -2064,8 +1990,6 @@ static int eval_execute_function_bitlength(const zbx_eval_context_t *ctx, const /****************************************************************************** * * - * Function: eval_execute_function_char * - * * * Purpose: evaluate char() function * * * * Parameters: ctx - [IN] the evaluation context * @@ -2113,8 +2037,6 @@ static int eval_execute_function_char(const zbx_eval_context_t *ctx, const zbx_e /****************************************************************************** * * - * Function: eval_execute_function_ascii * - * * * Purpose: evaluate ascii() function * * * * Parameters: ctx - [IN] the evaluation context * @@ -2158,8 +2080,6 @@ static int eval_execute_function_ascii(const zbx_eval_context_t *ctx, const zbx_ /****************************************************************************** * * - * Function: eval_execute_function_between * - * * * Purpose: evaluate between() function * * * * Parameters: ctx - [IN] the evaluation context * @@ -2203,8 +2123,6 @@ static int eval_execute_function_between(const zbx_eval_context_t *ctx, const zb /****************************************************************************** * * - * Function: eval_execute_function_in * - * * * Purpose: evaluate in() function * * * * Parameters: ctx - [IN] the evaluation context * @@ -2295,8 +2213,6 @@ out: /****************************************************************************** * * - * Function: eval_execute_function_histogram_quantile * - * * * Purpose: evaluate histogram_quantile() function * * * * Parameters: ctx - [IN] the evaluation context * @@ -2425,8 +2341,6 @@ static int eval_execute_function_histogram_quantile(const zbx_eval_context_t *ct /****************************************************************************** * * - * Function: eval_execute_cb_function * - * * * Purpose: evaluate function by calling custom callback (if configured) * * * * Parameters: ctx - [IN] the evaluation context * @@ -2497,8 +2411,6 @@ static double eval_math_func_signum(double x) /****************************************************************************** * * - * Function: eval_execute_math_function_single_param * - * * * Purpose: evaluate mathematical function by calling passed function * * with 1 double argument * * * @@ -2580,8 +2492,6 @@ static double eval_math_func_truncate(double n, double decimal_points) /****************************************************************************** * * - * Function: eval_execute_math_function_double_param * - * * * Purpose: evaluate mathematical function by calling passed function * * with 2 double arguments * * * @@ -2650,8 +2560,6 @@ static int eval_execute_math_function_double_param(const zbx_eval_context_t *ctx /****************************************************************************** * * - * Function: eval_execute_math_function_return_value * - * * * Purpose: evaluate mathematical function that returns constant value * * * * Parameters: ctx - [IN] the evaluation context * @@ -2727,8 +2635,6 @@ static int eval_execute_function_count(const zbx_eval_context_t *ctx, const zbx_ /****************************************************************************** * * - * Function: eval_execute_common_function * - * * * Purpose: evaluate common function * * * * Parameters: ctx - [IN] the evaluation context * @@ -2902,8 +2808,6 @@ static int eval_execute_common_function(const zbx_eval_context_t *ctx, const zbx /****************************************************************************** * * - * Function: eval_execute_history_function * - * * * Purpose: evaluate history function * * * * Parameters: ctx - [IN] the evaluation context * @@ -2934,8 +2838,6 @@ static int eval_execute_history_function(const zbx_eval_context_t *ctx, const zb /****************************************************************************** * * - * Function: eval_throw_exception * - * * * Purpose: throw exception by returning the specified error * * * * Parameters: output - [IN/OUT] the output value stack * @@ -2960,8 +2862,6 @@ static void eval_throw_exception(zbx_vector_var_t *output, char **error) /****************************************************************************** * * - * Function: eval_execute * - * * * Purpose: evaluate pre-parsed expression * * * * Parameters: ctx - [IN] the evaluation context * @@ -3082,8 +2982,6 @@ out: /****************************************************************************** * * - * Function: eval_init_execute_context * - * * * Purpose: initialize execution context * * * * Parameters: ctx - [IN] the evaluation context * @@ -3109,8 +3007,6 @@ static void eval_init_execute_context(zbx_eval_context_t *ctx, const zbx_timespe /****************************************************************************** * * - * Function: zbx_eval_execute * - * * * Purpose: evaluate parsed expression * * * * Parameters: ctx - [IN] the evaluation context * @@ -3131,8 +3027,6 @@ int zbx_eval_execute(zbx_eval_context_t *ctx, const zbx_timespec_t *ts, zbx_vari /****************************************************************************** * * - * Function: zbx_eval_execute_ext * - * * * Purpose: evaluate parsed expression with callback for custom function * * processing * * * diff --git a/src/libs/zbxeval/misc.c b/src/libs/zbxeval/misc.c index a49c2b1a764..279495a4377 100644 --- a/src/libs/zbxeval/misc.c +++ b/src/libs/zbxeval/misc.c @@ -31,8 +31,6 @@ /****************************************************************************** * * - * Function: reserve_buffer * - * * * Purpose: reserve number of bytes in the specified buffer, reallocating if * * necessary * * * @@ -145,8 +143,6 @@ static zbx_uint32_t deserialize_variant(const unsigned char *ptr, zbx_variant_t /****************************************************************************** * * - * Function: zbx_eval_serialize * - * * * Purpose: serialize evaluation context into buffer * * * * Parameters: ctx - [IN] the evaluation context * @@ -209,8 +205,6 @@ size_t zbx_eval_serialize(const zbx_eval_context_t *ctx, zbx_mem_malloc_func_t m /****************************************************************************** * * - * Function: zbx_eval_deserialize * - * * * Purpose: deserialize evaluation context from buffer * * * * Parameters: ctx - [OUT] the evaluation context * @@ -262,8 +256,6 @@ static int compare_tokens_by_loc(const void *d1, const void *d2) /****************************************************************************** * * - * Function: eval_token_print_alloc * - * * * Purpose: print token into string quoting/escaping if necessary * * * * Parameters: ctx - [IN] the evaluation context * @@ -349,8 +341,6 @@ static void eval_token_print_alloc(const zbx_eval_context_t *ctx, char **str, si /****************************************************************************** * * - * Function: zbx_eval_compose_expression * - * * * Purpose: compose expression by replacing processed tokens (with values) in * * the original expression * * * @@ -406,8 +396,6 @@ void zbx_eval_compose_expression(const zbx_eval_context_t *ctx, char **expressio /****************************************************************************** * * - * Function: eval_has_usermacro * - * * * Purpose: check if string has possible user macro * * * * Parameters: str - [IN] the string to check * @@ -440,8 +428,6 @@ static int eval_has_usermacro(const char *str, size_t len) /****************************************************************************** * * - * Function: eval_query_expand_user_macros * - * * * Purpose: expand user macros in item query * * * * Parameters: itemquery - [IN] the evaluation context * @@ -541,8 +527,6 @@ out: /****************************************************************************** * * - * Function: zbx_eval_expand_user_macros * - * * * Purpose: expand user macros in parsed expression * * * * Parameters: ctx - [IN] the evaluation context * @@ -612,8 +596,6 @@ int zbx_eval_expand_user_macros(const zbx_eval_context_t *ctx, zbx_uint64_t *hos /****************************************************************************** * * - * Function: zbx_eval_set_exception * - * * * Purpose: set eval context to exception that will be returned when executed * * * * Parameters: ctx - [IN] the evaluation context * @@ -639,8 +621,6 @@ void zbx_eval_set_exception(zbx_eval_context_t *ctx, char *message) /****************************************************************************** * * - * Function: expression_extract_functionid * - * * * Purpose: extract functionid from token * * * * Parameters: expression - [IN] the original expression * @@ -681,8 +661,6 @@ static int expression_extract_functionid(const char *expression, zbx_eval_token_ /****************************************************************************** * * - * Function: zbx_eval_deserialize_dyn * - * * * Purpose: deserialize expression and extract specified tokens into values * * * * Parameters: data - [IN] the serialized expression * @@ -738,8 +716,6 @@ zbx_eval_context_t *zbx_eval_deserialize_dyn(const unsigned char *data, const ch /****************************************************************************** * * - * Function: zbx_eval_get_functionids * - * * * Purpose: get functionids from parsed expression * * * * Parameters: ctx - [IN] the evaluation context * @@ -762,8 +738,6 @@ void zbx_eval_get_functionids(zbx_eval_context_t *ctx, zbx_vector_uint64_t *func /****************************************************************************** * * - * Function: zbx_eval_get_functionids_ordered * - * * * Purpose: get functionids from parsed expression in the order they are * * written * * * @@ -800,8 +774,6 @@ void zbx_eval_get_functionids_ordered(zbx_eval_context_t *ctx, zbx_vector_uint64 /****************************************************************************** * * - * Function: zbx_eval_check_timer_functions * - * * * Purpose: check if expression contains timer function calls (date, time, * * now, dayofweek, dayofmonth) * * * @@ -839,8 +811,6 @@ int zbx_eval_check_timer_functions(const zbx_eval_context_t *ctx) /****************************************************************************** * * - * Function: zbx_get_serialized_expression_functionids * - * * * Purpose: extract functionids from serialized expression * * * * Parameters: expression - [IN] the original expression * @@ -901,8 +871,6 @@ void zbx_get_serialized_expression_functionids(const char *expression, const uns /****************************************************************************** * * - * Function: zbx_eval_get_constant * - * * * Purpose: the Nth constant in expression * * * * Parameters: ctx - [IN] the evaluation context * @@ -939,8 +907,6 @@ void zbx_eval_get_constant(const zbx_eval_context_t *ctx, int index, char **valu /****************************************************************************** * * - * Function: zbx_eval_replace_functionid * - * * * Purpose: replace functionid in parsed expression with new functionid macro * * * * Parameters: ctx - [IN] the evaluation context * @@ -986,8 +952,6 @@ void zbx_eval_replace_functionid(zbx_eval_context_t *ctx, zbx_uint64_t old_funct /****************************************************************************** * * - * Function: zbx_eval_validate_replaced_functionids * - * * * Purpose: validate parsed expression to check if all functionids were * * replaced * * * @@ -1019,8 +983,6 @@ int zbx_eval_validate_replaced_functionids(zbx_eval_context_t *ctx, char **error /****************************************************************************** * * - * Function: zbx_eval_copy * - * * * Purpose: copy parsed expression * * * * Parameters: dst - [OUT] the destination evaluation context * @@ -1047,8 +1009,6 @@ void zbx_eval_copy(zbx_eval_context_t *dst, const zbx_eval_context_t *src, const /****************************************************************************** * * - * Function: zbx_eval_format_function_error * - * * * Purpose: format function evaluation error message * * * * Parameters: function - [IN] the function name * @@ -1084,8 +1044,6 @@ char *zbx_eval_format_function_error(const char *function, const char *host, con /****************************************************************************** * * - * Function: zbx_eval_extract_history_queries * - * * * Purpose: copy history query into vector and replace it with vector index * * * * Parameters: ctx - [IN] the evaluation context * diff --git a/src/libs/zbxeval/parse.c b/src/libs/zbxeval/parse.c index 05e2f70f754..2a6b457c485 100644 --- a/src/libs/zbxeval/parse.c +++ b/src/libs/zbxeval/parse.c @@ -36,8 +36,6 @@ static int is_whitespace(char c) /****************************************************************************** * * - * Function: eval_get_whitespace_len * - * * * Purpose: find the number of following whitespace characters * * * * Parameters: ctx - [IN] the evaluation context * @@ -58,8 +56,6 @@ static size_t eval_get_whitespace_len(zbx_eval_context_t *ctx, size_t pos) /****************************************************************************** * * - * Function: eval_update_const_variable * - * * * Purpose: update constant variable index in the trigger expression * * * * Parameters: ctx - [IN] the evaluation context * @@ -89,8 +85,6 @@ static void eval_update_const_variable(zbx_eval_context_t *ctx, zbx_eval_token_t /****************************************************************************** * * - * Function: eval_is_compound_number_char * - * * * Purpose: check if the character can be a part of a compound number * * following a macro * * * @@ -115,8 +109,6 @@ static int eval_is_compound_number_char(char c, int pos) /****************************************************************************** * * - * Function: eval_parse_functionid * - * * * Purpose: parse functionid token ({<functionid>}) * * * * Parameters: ctx - [IN] the evaluation context * @@ -144,8 +136,6 @@ static int eval_parse_functionid(zbx_eval_context_t *ctx, size_t pos, zbx_eval_t /****************************************************************************** * * - * Function: eval_parse_macro * - * * * Purpose: parse macro * * * * Parameters: ctx - [IN] the evaluation context * @@ -184,8 +174,6 @@ static int eval_parse_macro(zbx_eval_context_t *ctx, int pos, zbx_token_t *tok) /****************************************************************************** * * - * Function: eval_parse_number * - * * * Purpose: parse numeric value * * * * Parameters: ctx - [IN] the evaluation context * @@ -221,8 +209,6 @@ static int eval_parse_number(zbx_eval_context_t *ctx, size_t pos, size_t *pos_r) /****************************************************************************** * * - * Function: eval_parse_constant * - * * * Purpose: parse constant value * * * * Parameters: ctx - [IN] the evaluation context * @@ -326,8 +312,6 @@ out: /****************************************************************************** * * - * Function: eval_parse_character_token * - * * * Purpose: parse single character token * * * * Parameters: pos - [IN] the starting position * @@ -344,8 +328,6 @@ static void eval_parse_character_token(size_t pos, zbx_token_type_t type, zbx_ev /****************************************************************************** * * - * Function: eval_parse_less_character_token * - * * * Purpose: parse token starting with '<' * * * * Parameters: ctx - [IN] the evaluation context * @@ -386,8 +368,6 @@ static int eval_parse_less_character_token(zbx_eval_context_t *ctx, size_t pos, /****************************************************************************** * * - * Function: eval_parse_greater_character_token * - * * * Purpose: parse token starting with '>' * * * * Parameters: ctx - [IN] the evaluation context * @@ -411,8 +391,6 @@ static void eval_parse_greater_character_token(zbx_eval_context_t *ctx, size_t p /****************************************************************************** * * - * Function: eval_parse_string_token * - * * * Purpose: parse string variable token * * * * Parameters: ctx - [IN] the evaluation context * @@ -459,8 +437,6 @@ static int eval_parse_string_token(zbx_eval_context_t *ctx, size_t pos, zbx_eval /****************************************************************************** * * - * Function: eval_parse_number_token * - * * * Purpose: parse numeric variable token * * * * Parameters: ctx - [IN] the evaluation context * @@ -502,8 +478,6 @@ static int eval_parse_number_token(zbx_eval_context_t *ctx, size_t pos, zbx_eval /****************************************************************************** * * - * Function: eval_parse_logic_token * - * * * Purpose: parse logical operation token * * * * Parameters: ctx - [IN] the evaluation context * @@ -548,8 +522,6 @@ static int eval_parse_logic_token(zbx_eval_context_t *ctx, size_t pos, zbx_eval_ /****************************************************************************** * * - * Function: eval_parse_function_token * - * * * Purpose: parse function token * * * * Parameters: ctx - [IN] the evaluation context * @@ -583,8 +555,6 @@ static int eval_parse_function_token(zbx_eval_context_t *ctx, size_t pos, zbx_ev /****************************************************************************** * * - * Function: eval_parse_query_filter * - * * * Purpose: parse item query filter (?[group="xyz"]) * * * * Parameters: ptr - [IN] - the filter to parse * @@ -629,8 +599,6 @@ static int eval_parse_query_filter(const char **ptr) /****************************************************************************** * * - * Function: eval_parse_query * - * * * Purpose: parse item query /host/key?[filter] into host, key and filter * * components * * * @@ -714,8 +682,6 @@ size_t eval_parse_query(const char *str, const char **phost, const char **pkey, /****************************************************************************** * * - * Function: eval_parse_query_token * - * * * Purpose: parse history query token * * * * Parameters: ctx - [IN] the evaluation context * @@ -749,8 +715,6 @@ static int eval_parse_query_token(zbx_eval_context_t *ctx, size_t pos, zbx_eval_ /****************************************************************************** * * - * Function: eval_parse_time_token * - * * * Purpose: parse time period token * * * * Parameters: ctx - [IN] the evaluation context * @@ -798,8 +762,6 @@ static int eval_parse_period_token(zbx_eval_context_t *ctx, size_t pos, zbx_eval /****************************************************************************** * * - * Function: eval_parse_property_token * - * * * Purpose: parse property token * * * * Parameters: ctx - [IN] the evaluation context * @@ -835,8 +797,6 @@ static int eval_parse_property_token(zbx_eval_context_t *ctx, size_t pos, zbx_ev /****************************************************************************** * * - * Function: eval_parse_token * - * * * Purpose: parse token * * * * Parameters: ctx - [IN] the evaluation context * @@ -1036,8 +996,6 @@ static int eval_parse_token(zbx_eval_context_t *ctx, size_t pos, zbx_eval_token_ /****************************************************************************** * * - * Function: eval_append_operator * - * * * Purpose: add operator/function token to evaluation stack * * * * Parameters: ctx - [IN] the evaluation context * @@ -1124,8 +1082,6 @@ static int eval_append_operator(zbx_eval_context_t *ctx, zbx_eval_token_t *token /****************************************************************************** * * - * Function: eval_append_operand * - * * * Purpose: add operand token to evaluation stack * * * * Parameters: ctx - [IN] the evaluation context * @@ -1184,8 +1140,6 @@ static int eval_append_operand(zbx_eval_context_t *ctx, zbx_eval_token_t *token, /****************************************************************************** * * - * Function: eval_append_arg_null * - * * * Purpose: add null argument token to evaluation stack * * * * Parameters: ctx - [IN] the evaluation context * @@ -1200,8 +1154,6 @@ static void eval_append_arg_null(zbx_eval_context_t *ctx) /****************************************************************************** * * - * Function: eval_clear * - * * * Purpose: free resources allocated by evaluation context * * * * Parameters: ctx - [IN] the evaluation context * @@ -1222,8 +1174,6 @@ static void eval_clear(zbx_eval_context_t *ctx) /****************************************************************************** * * - * Function: eval_parse_expression * - * * * Purpose: parse expression into tokens in postfix notation order * * * * Parameters: ctx - [OUT] the evaluation context * @@ -1481,8 +1431,6 @@ out: /****************************************************************************** * * - * Function: zbx_eval_parse_expression * - * * * Purpose: parse expression into tokens in postfix notation order * * * * Parameters: ctx - [OUT] the evaluation context * @@ -1501,8 +1449,6 @@ int zbx_eval_parse_expression(zbx_eval_context_t *ctx, const char *expression, z /****************************************************************************** * * - * Function: zbx_eval_init * - * * * Purpose: initialize context so it can be cleared without parsing * * * * Parameters: ctx - [IN] the evaluation context * @@ -1515,8 +1461,6 @@ void zbx_eval_init(zbx_eval_context_t *ctx) /****************************************************************************** * * - * Function: zbx_eval_clear * - * * * Purpose: free resources allocated by evaluation context * * * * Parameters: ctx - [IN] the evaluation context * @@ -1529,8 +1473,6 @@ void zbx_eval_clear(zbx_eval_context_t *ctx) /****************************************************************************** * * - * Function: zbx_eval_status * - * * * Purpose: return evaluation context status * * * * Parameters: ctx - [IN] the evaluation context * diff --git a/src/libs/zbxeval/query.c b/src/libs/zbxeval/query.c index 928f7b05de8..a4d223adbb3 100644 --- a/src/libs/zbxeval/query.c +++ b/src/libs/zbxeval/query.c @@ -29,8 +29,6 @@ /****************************************************************************** * * - * Function: zbx_eval_parse_query * - * * * Purpose: parse item query /host/key?[filter] into host, key and filter * * components * * * @@ -67,8 +65,6 @@ size_t zbx_eval_parse_query(const char *str, size_t len, zbx_item_query_t *query /****************************************************************************** * * - * Function: zbx_eval_clear_filter * - * * * Purpose: frees resources allocated by item reference * * * ******************************************************************************/ @@ -81,8 +77,6 @@ void zbx_eval_clear_query(zbx_item_query_t *query) /****************************************************************************** * * - * Function: zbx_eval_prepare_filter * - * * * Purpose: prepare filter expression by converting property comparisons * * prop =/<> "value" to prop("value")/not prop("value") function * * calls. * @@ -136,8 +130,6 @@ void zbx_eval_prepare_filter(zbx_eval_context_t *ctx) /****************************************************************************** * * - * Function: eval_filter_apply_op2 * - * * * Purpose: apply binary operation to stack * * * * Parameters: token - [IN] the operation token * @@ -185,8 +177,6 @@ static void eval_filter_apply_op2(zbx_eval_token_t *token, zbx_vector_eval_token /****************************************************************************** * * - * Function: eval_filter_apply_op1 * - * * * Purpose: apply unary operation to stack * * * * Parameters: token - [IN] the operation token * @@ -209,8 +199,6 @@ static void eval_filter_apply_op1(zbx_eval_token_t *token, zbx_vector_eval_token /****************************************************************************** * * - * Function: eval_filter_apply_func * - * * * Purpose: apply function to stack * * * * Parameters: ctx - [IN] the evaluation context * @@ -240,8 +228,6 @@ static void eval_filter_apply_func(zbx_eval_context_t *ctx, zbx_eval_token_t *to /****************************************************************************** * * - * Function: eval_op_str * - * * * Purpose: get operator in text format * * * * Parameters: op - [IN] the operator type * @@ -275,8 +261,6 @@ static const char *eval_op_str(zbx_token_type_t op) /****************************************************************************** * * - * Function: eval_unquote_str * - * * * Purpose: unquote string * * * * Parameters: str - [IN] the string to unquote * @@ -315,8 +299,6 @@ static char *eval_unquote_str(char *str) /****************************************************************************** * * - * Function: eval_generate_filter * - * * * Purpose: generate filter expression from the specified stack * * * * Parameters: ctx - [IN] the evaluation context * @@ -418,8 +400,6 @@ out: /****************************************************************************** * * - * Function: zbx_eval_get_group_filter * - * * * Purpose: generate group SQL filter expression from item filter * * * * Parameters: ctx - [IN] the filter expression evaluation context * diff --git a/src/libs/zbxexec/execute.c b/src/libs/zbxexec/execute.c index d5c1f9fe166..823c84a11f3 100644 --- a/src/libs/zbxexec/execute.c +++ b/src/libs/zbxexec/execute.c @@ -29,8 +29,6 @@ /****************************************************************************** * * - * Function: zbx_get_timediff_ms * - * * * Purpose: considers a difference between times in milliseconds * * * * Parameters: time1 - [IN] first time point * @@ -56,8 +54,6 @@ static int zbx_get_timediff_ms(struct _timeb *time1, struct _timeb *time2) /****************************************************************************** * * - * Function: zbx_read_from_pipe * - * * * Purpose: read data from pipe * * * * Parameters: hRead - [IN] a handle to the device * @@ -121,8 +117,6 @@ static int zbx_read_from_pipe(HANDLE hRead, char **buf, size_t *buf_size, size_t /****************************************************************************** * * - * Function: zbx_popen * - * * * Purpose: this function opens a process by creating a pipe, forking, * * and invoking the shell * * * @@ -244,8 +238,6 @@ static int zbx_popen(pid_t *pid, const char *command, const char *dir) /****************************************************************************** * * - * Function: zbx_waitpid * - * * * Purpose: this function waits for process to change state * * * * Parameters: pid - [IN] child process PID * @@ -308,8 +300,6 @@ exit: /****************************************************************************** * * - * Function: zbx_execute * - * * * Purpose: this function executes a script and returns result from stdout * * * * Parameters: command - [IN] command for execution * @@ -561,8 +551,6 @@ close: /****************************************************************************** * * - * Function: zbx_execute_nowait * - * * * Purpose: this function executes a script in the background and * * suppresses the std output * * * diff --git a/src/libs/zbxha/ha.c b/src/libs/zbxha/ha.c index 759b39fe3ce..3a23cb714fc 100644 --- a/src/libs/zbxha/ha.c +++ b/src/libs/zbxha/ha.c @@ -25,8 +25,6 @@ /****************************************************************************** * * - * Function: zbx_ha_get_nodes * - * * * Purpose: get HA nodes in json format * * * ******************************************************************************/ @@ -62,8 +60,6 @@ int zbx_ha_get_nodes(char **nodes, char **error) /****************************************************************************** * * - * Function: zbx_ha_remove_node * - * * * Purpose: remove HA node * * * * Comments: A new socket is opened to avoid interfering with notification * @@ -91,8 +87,6 @@ int zbx_ha_remove_node(const char *node, char **result, char **error) /****************************************************************************** * * - * Function: zbx_ha_set_failover_delay * - * * * Purpose: set HA failover delay * * * * Comments: A new socket is opened to avoid interfering with notification * @@ -118,8 +112,6 @@ int zbx_ha_set_failover_delay(int delay, char **error) /****************************************************************************** * * - * Function: zbx_ha_get_failover_delay * - * * * Purpose: get HA failover delay * * * * Comments: A new socket is opened to avoid interfering with notification * @@ -144,8 +136,6 @@ int zbx_ha_get_failover_delay(int *delay, char **error) /****************************************************************************** * * - * Function: zbx_ha_change_loglevel * - * * * Purpose: change HA manager log level * * * ******************************************************************************/ @@ -169,8 +159,6 @@ int zbx_ha_change_loglevel(int direction, char **error) /****************************************************************************** * * - * Function: zbx_ha_status_str * - * * * Purpose: get HA status in text format * * * ******************************************************************************/ diff --git a/src/libs/zbxhistory/history.c b/src/libs/zbxhistory/history.c index cae847db188..63a24a65b6c 100644 --- a/src/libs/zbxhistory/history.c +++ b/src/libs/zbxhistory/history.c @@ -34,8 +34,6 @@ zbx_history_iface_t history_ifaces[ITEM_VALUE_TYPE_MAX]; /************************************************************************************ * * - * Function: zbx_history_init * - * * * Purpose: initializes history storage * * * * Comments: History interfaces are created for all values types based on * @@ -67,8 +65,6 @@ int zbx_history_init(char **error) /************************************************************************************ * * - * Function: zbx_history_destroy * - * * * Purpose: destroys history storage * * * * Comments: All interfaces created by zbx_history_init() function are destroyed * @@ -89,8 +85,6 @@ void zbx_history_destroy(void) /************************************************************************************ * * - * Function: zbx_history_add_values * - * * * Purpose: Sends values to the history storage * * * * Parameters: history - [IN] the values to store * @@ -132,8 +126,6 @@ int zbx_history_add_values(const zbx_vector_ptr_t *history, int *ret_flush) /************************************************************************************ * * - * Function: zbx_history_get_values * - * * * Purpose: gets item values from history storage * * * * Parameters: itemid - [IN] the itemid * @@ -184,8 +176,6 @@ int zbx_history_get_values(zbx_uint64_t itemid, int value_type, int start, int c /************************************************************************************ * * - * Function: zbx_history_requires_trends * - * * * Purpose: checks if the value type requires trends data calculations * * * * Parameters: value_type - [IN] the value type * @@ -206,8 +196,6 @@ int zbx_history_requires_trends(int value_type) /****************************************************************************** * * - * Function: history_logfree * - * * * Purpose: frees history log and all resources allocated for it * * * * Parameters: log - [IN] the history log to free * @@ -222,8 +210,6 @@ static void history_logfree(zbx_log_value_t *log) /****************************************************************************** * * - * Function: zbx_history_record_vector_destroy * - * * * Purpose: destroys value vector and frees resources allocated for it * * * * Parameters: vector - [IN] the value vector * @@ -243,8 +229,6 @@ void zbx_history_record_vector_destroy(zbx_vector_history_record_t *vector, int /****************************************************************************** * * - * Function: zbx_history_record_clear * - * * * Purpose: frees resources allocated by a cached value * * * * Parameters: value - [IN] the cached value to clear * @@ -266,8 +250,6 @@ void zbx_history_record_clear(zbx_history_record_t *value, int value_type) /****************************************************************************** * * - * Function: zbx_history_value2str * - * * * Purpose: converts history value to string format * * * * Parameters: buffer - [OUT] the output buffer * @@ -297,8 +279,6 @@ void zbx_history_value2str(char *buffer, size_t size, const history_value_t *val /****************************************************************************** * * - * Function: zbx_history_value2str_dyn * - * * * Purpose: converts history value to string format (with dynamic buffer) * * * * Parameters: value - [IN] the value to convert * @@ -332,8 +312,6 @@ char *zbx_history_value2str_dyn(const history_value_t *value, int value_type) /****************************************************************************** * * - * Function: zbx_history_value_print * - * * * Purpose: converts history value to string format (double type printed in * * human friendly format) * * * @@ -353,8 +331,6 @@ void zbx_history_value_print(char *buffer, size_t size, const history_value_t *v /****************************************************************************** * * - * Function: zbx_history_record_vector_clean * - * * * Purpose: releases resources allocated to store history records * * * * Parameters: vector - [IN] the history record vector * @@ -383,8 +359,6 @@ void zbx_history_record_vector_clean(zbx_vector_history_record_t *vector, int va /****************************************************************************** * * - * Function: zbx_history_record_compare_asc_func * - * * * Purpose: compares two cache values by their timestamps * * * * Parameters: d1 - [IN] the first value * @@ -408,8 +382,6 @@ int zbx_history_record_compare_asc_func(const zbx_history_record_t *d1, const zb /****************************************************************************** * * - * Function: vc_history_record_compare_desc_func * - * * * Purpose: compares two cache values by their timestamps * * * * Parameters: d1 - [IN] the first value * @@ -433,8 +405,6 @@ int zbx_history_record_compare_desc_func(const zbx_history_record_t *d1, const z /****************************************************************************** * * - * Function: zbx_history_value2variant * - * * * Purpose: converts history value to variant value * * * * Parameters: value - [IN] the value to convert * @@ -463,8 +433,6 @@ void zbx_history_value2variant(const history_value_t *value, unsigned char value /****************************************************************************** * * - * Function: zbx_history_check_version * - * * * Purpose: relays the version retrieval logic to the history implementation * * functions * * * diff --git a/src/libs/zbxhistory/history_elastic.c b/src/libs/zbxhistory/history_elastic.c index 1e96fb5bec0..7a5b2377da6 100644 --- a/src/libs/zbxhistory/history_elastic.c +++ b/src/libs/zbxhistory/history_elastic.c @@ -220,8 +220,6 @@ static void elastic_log_error(CURL *handle, CURLcode error, const char *errbuf) /************************************************************************************ * * - * Function: elastic_close * - * * * Purpose: closes connection and releases allocated resources * * * * Parameters: hist - [IN] the history storage interface * @@ -246,8 +244,6 @@ static void elastic_close(zbx_history_iface_t *hist) /****************************************************************************** * * - * Function: elastic_is_error_present * - * * * Purpose: check a error from Elastic json response * * * * Parameters: page - [IN] the buffer with json response * @@ -322,8 +318,6 @@ static int elastic_is_error_present(zbx_httppage_t *page, char **err) /************************************************************************************ * * - * Function: elastic_writer_init * - * * * Purpose: initializes elastic writer for a new batch of history values * * * ************************************************************************************/ @@ -345,8 +339,6 @@ static void elastic_writer_init(void) /************************************************************************************ * * - * Function: elastic_writer_release * - * * * Purpose: releases initialized elastic writer by freeing allocated resources and * * setting its state to uninitialized. * * * @@ -368,8 +360,6 @@ static void elastic_writer_release(void) /************************************************************************************ * * - * Function: elastic_writer_add_iface * - * * * Purpose: adds history storage interface to be flushed later * * * * Parameters: db_insert - [IN] bulk insert data * @@ -429,8 +419,6 @@ out: /************************************************************************************ * * - * Function: elastic_writer_flush * - * * * Purpose: posts historical data to elastic storage * * * ************************************************************************************/ @@ -600,8 +588,6 @@ end: /************************************************************************************ * * - * Function: elastic_destroy * - * * * Purpose: destroys history storage interface * * * * Parameters: hist - [IN] the history storage interface * @@ -619,8 +605,6 @@ static void elastic_destroy(zbx_history_iface_t *hist) /************************************************************************************ * * - * Function: elastic_get_values * - * * * Purpose: gets item history data from history storage * * * * Parameters: hist - [IN] the history storage interface * @@ -867,8 +851,6 @@ out: /************************************************************************************ * * - * Function: elastic_add_values * - * * * Purpose: sends history data to the storage * * * * Parameters: hist - [IN] the history storage interface * @@ -953,8 +935,6 @@ static int elastic_add_values(zbx_history_iface_t *hist, const zbx_vector_ptr_t /************************************************************************************ * * - * Function: elastic_flush * - * * * Purpose: flushes the history data to storage * * * * Parameters: hist - [IN] the history storage interface * @@ -972,8 +952,6 @@ static int elastic_flush(zbx_history_iface_t *hist) /************************************************************************************ * * - * Function: zbx_history_elastic_init * - * * * Purpose: initializes history storage interface * * * * Parameters: hist - [IN] the history storage interface * @@ -1015,8 +993,6 @@ int zbx_history_elastic_init(zbx_history_iface_t *hist, unsigned char value_type /************************************************************************************ * * - * Function: zbx_elastic_version_extract * - * * * Purpose: queries elastic search version and extracts the numeric version from * * the response string * * * diff --git a/src/libs/zbxhistory/history_sql.c b/src/libs/zbxhistory/history_sql.c index 8713b7fa748..1fa3068e25b 100644 --- a/src/libs/zbxhistory/history_sql.c +++ b/src/libs/zbxhistory/history_sql.c @@ -96,8 +96,6 @@ static zbx_vc_history_table_t vc_history_tables[] = { /************************************************************************************ * * - * Function: sql_writer_init * - * * * Purpose: initializes sql writer for a new batch of history values * * * ************************************************************************************/ @@ -113,8 +111,6 @@ static void sql_writer_init(void) /************************************************************************************ * * - * Function: sql_writer_release * - * * * Purpose: releases initialized sql writer by freeing allocated resources and * * setting its state to uninitialized. * * * @@ -138,8 +134,6 @@ static void sql_writer_release(void) /************************************************************************************ * * - * Function: sql_writer_add_dbinsert * - * * * Purpose: adds bulk insert data to be flushed later * * * * Parameters: db_insert - [IN] bulk insert data * @@ -153,8 +147,6 @@ static void sql_writer_add_dbinsert(zbx_db_insert_t *db_insert) /************************************************************************************ * * - * Function: sql_writer_flush * - * * * Purpose: flushes bulk insert data into database * * * ************************************************************************************/ @@ -204,8 +196,6 @@ typedef void (*add_history_func_t)(const zbx_vector_ptr_t *history); /****************************************************************************** * * - * Function: add_history_dbl * - * * ******************************************************************************/ static void add_history_dbl(const zbx_vector_ptr_t *history) { @@ -230,8 +220,6 @@ static void add_history_dbl(const zbx_vector_ptr_t *history) /****************************************************************************** * * - * Function: add_history_uint * - * * ******************************************************************************/ static void add_history_uint(zbx_vector_ptr_t *history) { @@ -256,8 +244,6 @@ static void add_history_uint(zbx_vector_ptr_t *history) /****************************************************************************** * * - * Function: add_history_str * - * * ******************************************************************************/ static void add_history_str(zbx_vector_ptr_t *history) { @@ -282,8 +268,6 @@ static void add_history_str(zbx_vector_ptr_t *history) /****************************************************************************** * * - * Function: add_history_text * - * * ******************************************************************************/ static void add_history_text(zbx_vector_ptr_t *history) { @@ -308,8 +292,6 @@ static void add_history_text(zbx_vector_ptr_t *history) /****************************************************************************** * * - * Function: add_history_log * - * * ******************************************************************************/ static void add_history_log(zbx_vector_ptr_t *history) { @@ -345,8 +327,6 @@ static void add_history_log(zbx_vector_ptr_t *history) /********************************************************************************* * * - * Function: db_read_values_by_time * - * * * Purpose: reads item history data from database * * * * Parameters: itemid - [IN] the itemid * @@ -415,8 +395,6 @@ out: /************************************************************************************ * * - * Function: db_read_values_by_count * - * * * Purpose: reads item history data from database * * * * Parameters: itemid - [IN] the itemid * @@ -521,8 +499,6 @@ out: /************************************************************************************ * * - * Function: db_read_values_by_time_and_count * - * * * Purpose: reads item history data from database * * * * Parameters: itemid - [IN] the itemid * @@ -619,8 +595,6 @@ out: /************************************************************************************ * * - * Function: sql_destroy * - * * * Purpose: destroys history storage interface * * * * Parameters: hist - [IN] the history storage interface * @@ -633,8 +607,6 @@ static void sql_destroy(zbx_history_iface_t *hist) /************************************************************************************ * * - * Function: sql_get_values * - * * * Purpose: gets item history data from history storage * * * * Parameters: hist - [IN] the history storage interface * @@ -665,8 +637,6 @@ static int sql_get_values(zbx_history_iface_t *hist, zbx_uint64_t itemid, int st /************************************************************************************ * * - * Function: sql_add_values * - * * * Purpose: sends history data to the storage * * * * Parameters: hist - [IN] the history storage interface * @@ -696,8 +666,6 @@ static int sql_add_values(zbx_history_iface_t *hist, const zbx_vector_ptr_t *his /************************************************************************************ * * - * Function: sql_flush * - * * * Purpose: flushes the history data to storage * * * * Parameters: hist - [IN] the history storage interface * @@ -715,8 +683,6 @@ static int sql_flush(zbx_history_iface_t *hist) /************************************************************************************ * * - * Function: zbx_history_sql_init * - * * * Purpose: initializes history storage interface * * * * Parameters: hist - [IN] the history storage interface * diff --git a/src/libs/zbxhttp/punycode.c b/src/libs/zbxhttp/punycode.c index 2eac47bba05..ca339c14076 100644 --- a/src/libs/zbxhttp/punycode.c +++ b/src/libs/zbxhttp/punycode.c @@ -23,8 +23,6 @@ /****************************************************************************** * * - * Function: punycode_adapt * - * * * Purpose: after each delta is encoded or decoded, bias should be set for * * the next delta (should be adapted) * * * @@ -52,8 +50,6 @@ static zbx_uint32_t punycode_adapt(zbx_uint32_t delta, int count, int divisor) /****************************************************************************** * * - * Function: punycode_encode_digit * - * * * Purpose: encodes punycode digit into ansi character [a-z0-9] * * * * Parameters: digit - [IN] digit to encode * @@ -74,8 +70,6 @@ static char punycode_encode_digit(int digit) /****************************************************************************** * * - * Function: punycode_encode_codepoints * - * * * Purpose: encodes array of unicode codepoints into into punycode (RFC 3492) * * * * Parameters: codepoints - [IN] codepoints to encode * @@ -181,8 +175,6 @@ out: /****************************************************************************** * * - * Function: punycode_encode_part * - * * * Purpose: encodes unicode domain name part into punycode (RFC 3492) * * domain is being split in parts by punycode_encode by using * * character '.' as part separator * @@ -235,8 +227,6 @@ static int punycode_encode_part(zbx_uint32_t *codepoints, zbx_uint32_t count, ch /****************************************************************************** * * - * Function: zbx_http_punycode_encode * - * * * Purpose: encodes unicode domain names into punycode (RFC 3492) * * * * Parameters: text - [IN] text to encode * @@ -311,8 +301,6 @@ out: /****************************************************************************** * * - * Function: zbx_http_punycode_encode_url * - * * * Purpose: encodes unicode domain name in URL into punycode * * * * Parameters: url - [IN/OUT] URL to encode * diff --git a/src/libs/zbxhttp/urlencode.c b/src/libs/zbxhttp/urlencode.c index e583ad53365..9fabd3f0cdc 100644 --- a/src/libs/zbxhttp/urlencode.c +++ b/src/libs/zbxhttp/urlencode.c @@ -23,8 +23,6 @@ /****************************************************************************** * * - * Function: zbx_http_url_encode * - * * * Purpose: replaces unsafe characters with a '%' followed by two hexadecimal * * digits (the only allowed exception is a space character that can * * be replaced with a plus (+) sign or with %20).to url encode * @@ -63,8 +61,6 @@ void zbx_http_url_encode(const char *source, char **result) /****************************************************************************** * * - * Function: zbx_http_url_decode * - * * * Purpose: replaces URL escape sequences ('+' or '%' followed by two * * hexadecimal digits) with matching characters. * * * diff --git a/src/libs/zbxicmpping/icmpping.c b/src/libs/zbxicmpping/icmpping.c index e69a8bf2daf..9432cecac9b 100644 --- a/src/libs/zbxicmpping/icmpping.c +++ b/src/libs/zbxicmpping/icmpping.c @@ -87,8 +87,6 @@ static void get_source_ip_option(const char *fping, const char **option, unsigne /****************************************************************************** * * - * Function: get_interval_option * - * * * Purpose: detect minimal possible fping packet interval * * * * Parameters: fping - [IN] the location of fping program * @@ -227,8 +225,6 @@ out: #ifdef HAVE_IPV6 /****************************************************************************** * * - * Function: get_ipv6_support * - * * * Purpose: check fping supports IPv6 * * * * Parameters: fping - [IN] the location of fping program * @@ -698,8 +694,6 @@ out: /****************************************************************************** * * - * Function: zbx_ping * - * * * Purpose: ping hosts listed in the host files * * * * hosts_count - [IN] number of target hosts * diff --git a/src/libs/zbxipcservice/ipcservice.c b/src/libs/zbxipcservice/ipcservice.c index e963b359449..e0544ea67f7 100644 --- a/src/libs/zbxipcservice/ipcservice.c +++ b/src/libs/zbxipcservice/ipcservice.c @@ -105,8 +105,6 @@ static const char *ipc_get_path(void) /****************************************************************************** * * - * Function: ipc_make_path * - * * * Purpose: makes socket path from the service name * * * * Parameters: service_name - [IN] the service name * @@ -167,8 +165,6 @@ static const char *ipc_make_path(const char *service_name, char **error) /****************************************************************************** * * - * Function: ipc_write_data * - * * * Purpose: writes data to a socket * * * * Parameters: fd - [IN] the socket file descriptor * @@ -215,8 +211,6 @@ static int ipc_write_data(int fd, const unsigned char *data, zbx_uint32_t size, /****************************************************************************** * * - * Function: ipc_read_data * - * * * Purpose: reads data from a socket * * * * Parameters: fd - [IN] the socket file descriptor * @@ -258,8 +252,6 @@ static int ipc_read_data(int fd, unsigned char *buffer, zbx_uint32_t size, zbx_u /****************************************************************************** * * - * Function: ipc_read_data_full * - * * * Purpose: reads data from a socket until the requested data has been read * * * * Parameters: fd - [IN] the socket file descriptor * @@ -302,8 +294,6 @@ out: /****************************************************************************** * * - * Function: ipc_socket_write_message * - * * * Purpose: writes IPC message to socket * * * * Parameters: csocket - [IN] the IPC socket * @@ -354,8 +344,6 @@ static int ipc_socket_write_message(zbx_ipc_socket_t *csocket, zbx_uint32_t code /****************************************************************************** * * - * Function: ipc_read_buffer * - * * * Purpose: reads message header and data from buffer * * * * Parameters: header - [IN/OUT] the message header * @@ -412,8 +400,6 @@ static int ipc_read_buffer(zbx_uint32_t *header, unsigned char **data, zbx_uint3 /****************************************************************************** * * - * Function: ipc_message_is_completed * - * * * Purpose: checks if IPC message has been completed * * * * Parameters: header - [IN] the message header * @@ -437,8 +423,6 @@ static int ipc_message_is_completed(const zbx_uint32_t *header, zbx_uint32_t rx_ /****************************************************************************** * * - * Function: ipc_socket_read_message * - * * * Purpose: reads IPC message from buffered client socket * * * * Parameters: csocket - [IN] the source socket * @@ -516,8 +500,6 @@ out: /****************************************************************************** * * - * Function: ipc_client_free_event * - * * * Purpose: frees client's libevent event * * * * Parameters: client - [IN] the client * @@ -540,8 +522,6 @@ static void ipc_client_free_events(zbx_ipc_client_t *client) /****************************************************************************** * * - * Function: ipc_client_free * - * * * Purpose: frees IPC service client * * * * Parameters: client - [IN] the client to free * @@ -573,8 +553,6 @@ static void ipc_client_free(zbx_ipc_client_t *client) /****************************************************************************** * * - * Function: ipc_client_push_rx_message * - * * * Purpose: adds message to received messages queue * * * * Parameters: client - [IN] the client to read * @@ -596,8 +574,6 @@ static void ipc_client_push_rx_message(zbx_ipc_client_t *client) /****************************************************************************** * * - * Function: ipc_client_pop_tx_message * - * * * Purpose: prepares to send the next message in send queue * * * * Parameters: client - [IN] the client * @@ -622,8 +598,6 @@ static void ipc_client_pop_tx_message(zbx_ipc_client_t *client) /****************************************************************************** * * - * Function: ipc_client_read * - * * * Purpose: reads data from IPC service client * * * * Parameters: client - [IN] the client to read * @@ -659,8 +633,6 @@ static int ipc_client_read(zbx_ipc_client_t *client) /****************************************************************************** * * - * Function: ipc_client_write * - * * * Purpose: writes queued data to IPC service client * * * * Parameters: client - [IN] the client * @@ -716,8 +688,6 @@ static int ipc_client_write(zbx_ipc_client_t *client) /****************************************************************************** * * - * Function: ipc_service_pop_client * - * * * Purpose: gets the next client with messages/closed socket from recv queue * * * * Parameters: service - [IN] the IPC service * @@ -737,8 +707,6 @@ static zbx_ipc_client_t *ipc_service_pop_client(zbx_ipc_service_t *service) /****************************************************************************** * * - * Function: ipc_service_push_client * - * * * Purpose: pushes client to the recv queue if needed * * * * Parameters: service - [IN] the IPC service * @@ -763,8 +731,6 @@ static void ipc_service_push_client(zbx_ipc_service_t *service, zbx_ipc_client_t /****************************************************************************** * * - * Function: ipc_service_add_client * - * * * Purpose: adds a new IPC service client * * * * Parameters: service - [IN] the IPC service * @@ -816,8 +782,6 @@ static void ipc_service_add_client(zbx_ipc_service_t *service, int fd) /****************************************************************************** * * - * Function: ipc_service_remove_client * - * * * Purpose: removes IPC service client * * * * Parameters: service - [IN] the IPC service * @@ -837,8 +801,6 @@ static void ipc_service_remove_client(zbx_ipc_service_t *service, zbx_ipc_client /****************************************************************************** * * - * Function: zbx_ipc_client_by_id * - * * * Purpose: to find connected client when only it's ID is known * * * * Parameters: service - [IN] the IPC service * @@ -865,8 +827,6 @@ zbx_ipc_client_t *zbx_ipc_client_by_id(const zbx_ipc_service_t *service, zbx_uin /****************************************************************************** * * - * Function: ipc_client_read_event_cb * - * * * Purpose: service client read event libevent callback * * * ******************************************************************************/ @@ -888,8 +848,6 @@ static void ipc_client_read_event_cb(evutil_socket_t fd, short what, void *arg) /****************************************************************************** * * - * Function: ipc_client_write_event_cb * - * * * Purpose: service client write event libevent callback * * * ******************************************************************************/ @@ -913,8 +871,6 @@ static void ipc_client_write_event_cb(evutil_socket_t fd, short what, void *arg) /****************************************************************************** * * - * Function: ipc_async_socket_write_event_cb * - * * * Purpose: asynchronous socket write event libevent callback * * * ******************************************************************************/ @@ -940,8 +896,6 @@ static void ipc_async_socket_write_event_cb(evutil_socket_t fd, short what, void /****************************************************************************** * * - * Function: ipc_async_socket_read_event_cb * - * * * Purpose: asynchronous socket read event libevent callback * * * ******************************************************************************/ @@ -961,8 +915,6 @@ static void ipc_async_socket_read_event_cb(evutil_socket_t fd, short what, void /****************************************************************************** * * - * Function: ipc_async_socket_timer_cb * - * * * Purpose: timer callback * * * ******************************************************************************/ @@ -978,8 +930,6 @@ static void ipc_async_socket_timer_cb(evutil_socket_t fd, short what, void *arg) /****************************************************************************** * * - * Function: ipc_service_accept * - * * * Purpose: accepts a new client connection * * * * Parameters: service - [IN] the IPC service * @@ -1009,8 +959,6 @@ static void ipc_service_accept(zbx_ipc_service_t *service) /****************************************************************************** * * - * Function: ipc_message_create * - * * * Purpose: creates IPC message * * * * Parameters: code - [IN] the message code * @@ -1042,8 +990,6 @@ static zbx_ipc_message_t *ipc_message_create(zbx_uint32_t code, const unsigned c /****************************************************************************** * * - * Function: ipc_service_event_log * - * * * Purpose: libevent logging callback * * * ******************************************************************************/ @@ -1075,8 +1021,6 @@ static void ipc_service_event_log_cb(int severity, const char *msg) /****************************************************************************** * * - * Function: ipc_service_init_libevent * - * * * Purpose: initialize libevent library * * * ******************************************************************************/ @@ -1087,8 +1031,6 @@ static void ipc_service_init_libevent(void) /****************************************************************************** * * - * Function: ipc_service_free_libevent * - * * * Purpose: uninitialize libevent library * * * ******************************************************************************/ @@ -1098,8 +1040,6 @@ static void ipc_service_free_libevent(void) /****************************************************************************** * * - * Function: ipc_service_client_connected_cb * - * * * Purpose: libevent listener callback * * * ******************************************************************************/ @@ -1115,8 +1055,6 @@ static void ipc_service_client_connected_cb(evutil_socket_t fd, short what, void /****************************************************************************** * * - * Function: ipc_service_timer_cb * - * * * Purpose: timer callback * * * ******************************************************************************/ @@ -1129,8 +1067,6 @@ static void ipc_service_timer_cb(evutil_socket_t fd, short what, void *arg) /****************************************************************************** * * - * Function: ipc_check_running_service * - * * * Purpose: checks if an IPC service is already running * * * * Parameters: service_name - [IN] * @@ -1156,8 +1092,6 @@ static int ipc_check_running_service(const char *service_name) /****************************************************************************** * * - * Function: zbx_ipc_socket_open * - * * * Purpose: opens socket to an IPC service listening on the specified path * * * * Parameters: csocket - [OUT] the IPC socket to the service * @@ -1218,8 +1152,6 @@ out: /****************************************************************************** * * - * Function: zbx_ipc_socket_close * - * * * Purpose: closes socket to an IPC service * * * * Parameters: csocket - [IN/OUT] the IPC socket to close * @@ -1240,8 +1172,6 @@ void zbx_ipc_socket_close(zbx_ipc_socket_t *csocket) /****************************************************************************** * * - * Function: zbx_ipc_socket_write * - * * * Purpose: writes a message to IPC service * * * * Parameters: csocket - [IN] an opened IPC socket to the service * @@ -1275,8 +1205,6 @@ int zbx_ipc_socket_write(zbx_ipc_socket_t *csocket, zbx_uint32_t code, const uns /****************************************************************************** * * - * Function: zbx_ipc_socket_read * - * * * Purpose: reads a message from IPC service * * * * Parameters: csocket - [IN] an opened IPC socket to the service * @@ -1330,8 +1258,6 @@ out: /****************************************************************************** * * - * Function: zbx_ipc_socket_connected * - * * * Purpose: check if socket is opened * * * * Parameters: csocket - [OUT] the IPC socket to the service * @@ -1347,8 +1273,6 @@ int zbx_ipc_socket_connected(const zbx_ipc_socket_t *csocket) /****************************************************************************** * * - * Function: zbx_ipc_message_free * - * * * Purpose: frees the resources allocated to store IPC message data * * * * Parameters: message - [IN] the message to free * @@ -1365,8 +1289,6 @@ void zbx_ipc_message_free(zbx_ipc_message_t *message) /****************************************************************************** * * - * Function: zbx_ipc_message_clean * - * * * Purpose: frees the resources allocated to store IPC message data * * * * Parameters: message - [IN] the message to clean * @@ -1379,8 +1301,6 @@ void zbx_ipc_message_clean(zbx_ipc_message_t *message) /****************************************************************************** * * - * Function: zbx_ipc_message_init * - * * * Purpose: initializes IPC message * * * * Parameters: message - [IN] the message to initialize * @@ -1393,8 +1313,6 @@ void zbx_ipc_message_init(zbx_ipc_message_t *message) /****************************************************************************** * * - * Function: zbx_ipc_message_format * - * * * Purpose: formats message to readable format for debug messages * * * * Parameters: message - [IN] the message * @@ -1430,8 +1348,6 @@ void zbx_ipc_message_format(const zbx_ipc_message_t *message, char **data) /****************************************************************************** * * - * Function: zbx_ipc_message_copy * - * * * Purpose: copies ipc message * * * * Parameters: dst - [IN] the destination message * @@ -1452,8 +1368,6 @@ void zbx_ipc_message_copy(zbx_ipc_message_t *dst, const zbx_ipc_message_t *src) /****************************************************************************** * * - * Function: zbx_ipc_service_init_env * - * * * Purpose: initializes IPC service environment * * * * Parameters: path - [IN] the service root path * @@ -1519,8 +1433,6 @@ out: /****************************************************************************** * * - * Function: zbx_ipc_service_free_env * - * * * Purpose: frees IPC service environment * * * ******************************************************************************/ @@ -1531,8 +1443,6 @@ void zbx_ipc_service_free_env(void) /****************************************************************************** * * - * Function: zbx_ipc_service_start * - * * * Purpose: starts IPC service on the specified path * * * * Parameters: service - [IN/OUT] the IPC service * @@ -1618,8 +1528,6 @@ out: /****************************************************************************** * * - * Function: zbx_ipc_service_close * - * * * Purpose: closes IPC service and frees the resources allocated by it * * * * Parameters: service - [IN/OUT] the IPC service * @@ -1650,8 +1558,6 @@ void zbx_ipc_service_close(zbx_ipc_service_t *service) /****************************************************************************** * * - * Function: zbx_ipc_service_recv * - * * * Purpose: receives ipc message from a connected client * * * * Parameters: service - [IN] the IPC service * @@ -1732,8 +1638,6 @@ int zbx_ipc_service_recv(zbx_ipc_service_t *service, const zbx_timespec_t *timeo /****************************************************************************** * * - * Function: zbx_ipc_client_send * - * * * Purpose: Sends IPC message to client * * * * Parameters: client - [IN] the IPC client * @@ -1784,8 +1688,6 @@ out: /****************************************************************************** * * - * Function: zbx_ipc_client_close * - * * * Purpose: closes client socket and frees resources allocated for client * * * * Parameters: client - [IN] the IPC client * @@ -1838,8 +1740,6 @@ void *zbx_ipc_client_get_userdata(zbx_ipc_client_t *client) /****************************************************************************** * * - * Function: zbx_ipc_async_socket_open * - * * * Purpose: opens asynchronous socket to IPC service client * * * * Parameters: client - [OUT] the IPC service client * @@ -1897,8 +1797,6 @@ out: /****************************************************************************** * * - * Function: zbx_ipc_async_socket_close * - * * * Purpose: closes asynchronous IPC socket and frees allocated resources * * * * Parameters: asocket - [IN] the asynchronous IPC socket * @@ -1919,8 +1817,6 @@ void zbx_ipc_async_socket_close(zbx_ipc_async_socket_t *asocket) /****************************************************************************** * * - * Function: zbx_ipc_async_socket_send * - * * * Purpose: Sends message through asynchronous IPC socket * * * * Parameters: asocket - [IN] the asynchronous IPC socket * @@ -1950,8 +1846,6 @@ int zbx_ipc_async_socket_send(zbx_ipc_async_socket_t *asocket, zbx_uint32_t code /****************************************************************************** * * - * Function: zbx_ipc_async_socket_recv * - * * * Purpose: receives message through asynchronous IPC socket * * * * Parameters: asocket - [IN] the asynchronous IPC socket * @@ -2024,8 +1918,6 @@ int zbx_ipc_async_socket_recv(zbx_ipc_async_socket_t *asocket, int timeout, zbx_ /****************************************************************************** * * - * Function: zbx_ipc_async_socket_flush * - * * * Purpose: flushes unsent through asynchronous IPC socket * * * * Parameters: asocket - [IN] the asynchronous IPC service socket * @@ -2093,8 +1985,6 @@ out: /****************************************************************************** * * - * Function: zbx_ipc_async_socket_check_unsent * - * * * Purpose: check if there are data to be sent * * * * Parameters: asocket - [IN] the asynchronous IPC service socket * @@ -2110,8 +2000,6 @@ int zbx_ipc_async_socket_check_unsent(zbx_ipc_async_socket_t *asocket) /****************************************************************************** * * - * Function: zbx_ipc_async_socket_connected * - * * * Purpose: check if socket is connected * * * * Parameters: asocket - [IN] the asynchronous IPC service socket * @@ -2130,8 +2018,6 @@ int zbx_ipc_async_socket_connected(zbx_ipc_async_socket_t *asocket) /****************************************************************************** * * - * Function: zbx_ipc_async_exchange * - * * * Purpose: connect, send message and receive response in a given timeout * * * * Parameters: service_name - [IN] the IPC service name * diff --git a/src/libs/zbxjson/json.c b/src/libs/zbxjson/json.c index 2e1ca7a2011..0f08f57f56e 100644 --- a/src/libs/zbxjson/json.c +++ b/src/libs/zbxjson/json.c @@ -25,8 +25,6 @@ /****************************************************************************** * * - * Function: zbx_json_strerror * - * * * Purpose: return string describing json error * * * * Return value: pointer to the null terminated string * @@ -68,8 +66,6 @@ void zbx_set_json_strerror(const char *fmt, ...) /****************************************************************************** * * - * Function: __zbx_json_realloc * - * * * Author: Alexander Vladishev * * * ******************************************************************************/ @@ -213,8 +209,6 @@ static size_t __zbx_json_stringsize(const char *string, zbx_json_type_t type) /****************************************************************************** * * - * Function: zbx_num2hex * - * * * Purpose: convert parameter c (0-15) to hexadecimal value ('0'-'f') * * * * Parameters: * @@ -492,8 +486,6 @@ int zbx_json_close(struct zbx_json *j) /****************************************************************************** * * - * Function: __zbx_json_type * - * * * Purpose: return type of pointed value * * * * Return value: type of pointed value * @@ -525,8 +517,6 @@ static zbx_json_type_t __zbx_json_type(const char *p) /****************************************************************************** * * - * Function: __zbx_json_rbracket * - * * * Purpose: return position of right bracket * * * * Return value: position of right bracket * @@ -585,8 +575,6 @@ static const char *__zbx_json_rbracket(const char *p) /****************************************************************************** * * - * Function: zbx_json_open * - * * * Purpose: open json buffer and check for brackets * * * * Return value: SUCCESS - processed successfully * @@ -629,8 +617,6 @@ int zbx_json_open(const char *buffer, struct zbx_json_parse *jp) /****************************************************************************** * * - * Function: zbx_json_next * - * * * Purpose: locate next pair or element * * * * Return value: NULL - no more values * @@ -698,8 +684,6 @@ const char *zbx_json_next(const struct zbx_json_parse *jp, const char *p) /****************************************************************************** * * - * Function: zbx_is_valid_json_hex * - * * * Purpose: check if a 4 character sequence is a valid hex number 0000 - FFFF * * * * Parameters: * @@ -723,8 +707,6 @@ static int zbx_is_valid_json_hex(const char *p) /****************************************************************************** * * - * Function: zbx_hex2num * - * * * Purpose: convert hexit c ('0'-'9''a'-'f''A'-'F') to number (0-15) * * * * Parameters: * @@ -752,8 +734,6 @@ static unsigned int zbx_hex2num(char c) /****************************************************************************** * * - * Function: zbx_json_decode_character * - * * * Purpose: decodes JSON escape character into UTF-8 * * * * Parameters: p - [IN/OUT] a pointer to the first character in string * @@ -871,8 +851,6 @@ static unsigned int zbx_json_decode_character(const char **p, unsigned char *byt /****************************************************************************** * * - * Function: zbx_json_copy_string * - * * * Purpose: copies json name/string value by omitting leading/trailing " and * * converting escape sequences * * * @@ -928,8 +906,6 @@ static const char *zbx_json_copy_string(const char *p, char *out, size_t size) /****************************************************************************** * * - * Function: zbx_json_copy_value * - * * * Purpose: copies unquoted (numeric, boolean) json value * * * * Parameters: p - [IN] a pointer to the next character in string * @@ -1047,8 +1023,6 @@ const char *zbx_json_pair_next(const struct zbx_json_parse *jp, const char *p, c /****************************************************************************** * * - * Function: zbx_json_pair_by_name * - * * * Purpose: find pair by name and return pointer to value * * * * Return value: pointer to value * @@ -1074,8 +1048,6 @@ const char *zbx_json_pair_by_name(const struct zbx_json_parse *jp, const char *n /****************************************************************************** * * - * Function: zbx_json_next_value * - * * * Author: Alexander Vladishev * * * ******************************************************************************/ @@ -1090,8 +1062,6 @@ const char *zbx_json_next_value(const struct zbx_json_parse *jp, const char *p, /****************************************************************************** * * - * Function: zbx_json_next_value_dyn * - * * ******************************************************************************/ const char *zbx_json_next_value_dyn(const struct zbx_json_parse *jp, const char *p, char **string, size_t *string_alloc, zbx_json_type_t *type) @@ -1104,8 +1074,6 @@ const char *zbx_json_next_value_dyn(const struct zbx_json_parse *jp, const char /****************************************************************************** * * - * Function: zbx_json_value_by_name * - * * * Purpose: return value by pair name * * * * Return value: SUCCEED - if value successfully parsed, FAIL - otherwise * @@ -1129,8 +1097,6 @@ int zbx_json_value_by_name(const struct zbx_json_parse *jp, const char *name, ch /****************************************************************************** * * - * Function: zbx_json_value_by_name_dyn * - * * * Purpose: return value by pair name * * * * Return value: SUCCEED - if value successfully parsed, FAIL - otherwise * @@ -1154,8 +1120,6 @@ int zbx_json_value_by_name_dyn(const struct zbx_json_parse *jp, const char *name /****************************************************************************** * * - * Function: zbx_json_brackets_open * - * * * Return value: SUCCESS - processed successfully * * FAIL - an error occurred * * * @@ -1179,8 +1143,6 @@ int zbx_json_brackets_open(const char *p, struct zbx_json_parse *jp) /****************************************************************************** * * - * Function: zbx_json_brackets_by_name * - * * * Return value: SUCCESS - processed successfully * * FAIL - an error occurred * * * @@ -1202,8 +1164,6 @@ int zbx_json_brackets_by_name(const struct zbx_json_parse *jp, const char *name, /****************************************************************************** * * - * Function: zbx_json_object_is_empty * - * * * Return value: SUCCESS - if object is empty * * FAIL - if object contains data * * * @@ -1217,8 +1177,6 @@ int zbx_json_object_is_empty(const struct zbx_json_parse *jp) /****************************************************************************** * * - * Function: zbx_json_count * - * * * Return value: number of elements in zbx_json_parse object * * * * Author: Alexander Vladishev * @@ -1237,8 +1195,6 @@ int zbx_json_count(const struct zbx_json_parse *jp) /****************************************************************************** * * - * Function: zbx_json_open_path * - * * * Purpose: opens an object by definite json path * * * * Return value: SUCCESS - processed successfully * diff --git a/src/libs/zbxjson/json_parser.c b/src/libs/zbxjson/json_parser.c index d3620d7403a..dad27bdbadb 100644 --- a/src/libs/zbxjson/json_parser.c +++ b/src/libs/zbxjson/json_parser.c @@ -29,8 +29,6 @@ static zbx_int64_t json_parse_object(const char *start, char **error); /****************************************************************************** * * - * Function: json_error * - * * * Purpose: Prepares JSON parsing error message * * * * Parameters: message - [IN] the error message * @@ -58,8 +56,6 @@ static zbx_int64_t json_error(const char *message, const char *json_buffer, char /****************************************************************************** * * - * Function: json_parse_string * - * * * Purpose: Parses JSON string value or object name * * * * Parameters: start - [IN] the JSON data without leading whitespace * @@ -135,8 +131,6 @@ static zbx_int64_t json_parse_string(const char *start, char **error) /****************************************************************************** * * - * Function: json_parse_array * - * * * Purpose: Parses JSON array value * * * * Parameters: start - [IN] the JSON data without leading whitespace * @@ -184,8 +178,6 @@ static zbx_int64_t json_parse_array(const char *start, char **error) /****************************************************************************** * * - * Function: json_parse_number * - * * * Purpose: Parses JSON number value * * * * Parameters: start - [IN] the JSON data without leading whitespace * @@ -259,8 +251,6 @@ static zbx_int64_t json_parse_number(const char *start, char **error) /****************************************************************************** * * - * Function: json_parse_literal * - * * * Purpose: Parses the specified literal value * * * * Parameters: start - [IN] the JSON data without leading whitespace * @@ -294,8 +284,6 @@ static zbx_int64_t json_parse_literal(const char *start, const char *text, char /****************************************************************************** * * - * Function: json_parse_value * - * * * Purpose: Parses JSON object value * * * * Parameters: start - [IN] the JSON data * @@ -366,8 +354,6 @@ zbx_int64_t json_parse_value(const char *start, char **error) /****************************************************************************** * * - * Function: json_parse_object * - * * * Purpose: Parses JSON object * * * * Parameters: start - [IN] the JSON data * @@ -435,8 +421,6 @@ static zbx_int64_t json_parse_object(const char *start, char **error) /****************************************************************************** * * - * Function: zbx_json_validate * - * * * Purpose: Validates JSON object * * * * Parameters: start - [IN] the string to validate * diff --git a/src/libs/zbxjson/jsonpath.c b/src/libs/zbxjson/jsonpath.c index 5341837073d..f29277e7d4e 100644 --- a/src/libs/zbxjson/jsonpath.c +++ b/src/libs/zbxjson/jsonpath.c @@ -115,8 +115,6 @@ static void zbx_vector_json_clear_ext(zbx_vector_json_t *elements) /****************************************************************************** * * - * Function: zbx_jsonpath_error * - * * * Purpose: set json error message and return FAIL * * * * Comments: This function is used to return from json path parsing functions * @@ -135,8 +133,6 @@ static int zbx_jsonpath_error(const char *path) /****************************************************************************** * * - * Function: jsonpath_strndup * - * * ******************************************************************************/ static char *jsonpath_strndup(const char *source, size_t len) { @@ -151,8 +147,6 @@ static char *jsonpath_strndup(const char *source, size_t len) /****************************************************************************** * * - * Function: jsonpath_unquote * - * * * Purpose: unquote single or double quoted string by stripping * * leading/trailing quotes and unescaping backslash sequences * * * @@ -178,8 +172,6 @@ static void jsonpath_unquote(char *value, const char *start, size_t len) /****************************************************************************** * * - * Function: jsonpath_unquote_dyn * - * * * Purpose: unquote string stripping leading/trailing quotes and unescaping * * backspace sequences * * * @@ -202,8 +194,6 @@ static char *jsonpath_unquote_dyn(const char *start, size_t len) /****************************************************************************** * * - * Function: jsonpath_list_create_item * - * * * Purpose: create jsonpath list item of the specified size * * * ******************************************************************************/ @@ -214,8 +204,6 @@ static zbx_jsonpath_list_node_t *jsonpath_list_create_node(size_t size) /****************************************************************************** * * - * Function: jsonpath_list_free * - * * * Purpose: free jsonpath list * * * ******************************************************************************/ @@ -232,8 +220,6 @@ static void jsonpath_list_free(zbx_jsonpath_list_node_t *list) /****************************************************************************** * * - * Function: jsonpath_create_token * - * * * Purpose: create jsonpath expression token * * * * Parameters: type - [IN] the token type * @@ -269,8 +255,6 @@ static zbx_jsonpath_token_t *jsonpath_create_token(int type, const char *express /****************************************************************************** * * - * Function: jsonpath_token_free * - * * ******************************************************************************/ static void jsonpath_token_free(zbx_jsonpath_token_t *token) { @@ -280,8 +264,6 @@ static void jsonpath_token_free(zbx_jsonpath_token_t *token) /****************************************************************************** * * - * Function: jsonpath_reserve * - * * * Purpose: reserve space in jsonpath segments array for more segments * * * * Parameters: jsonpath - [IN] the jsonpath data * @@ -312,8 +294,6 @@ static void jsonpath_reserve(zbx_jsonpath_t *jsonpath, int num) /****************************************************************************** * * - * Function: jsonpath_segment_clear * - * * ******************************************************************************/ static void jsonpath_segment_clear(zbx_jsonpath_segment_t *segment) { @@ -334,8 +314,6 @@ static void jsonpath_segment_clear(zbx_jsonpath_segment_t *segment) /****************************************************************************** * * - * Function: jsonpath_next * - * * * Purpose: find next component of json path * * * * Parameters: pnext - [IN/OUT] the reference to the next path component * @@ -415,8 +393,6 @@ static int jsonpath_next(const char **pnext) /****************************************************************************** * * - * Function: jsonpath_parse_substring * - * * * Purpose: parse single or double quoted substring * * * * Parameters: start - [IN] the substring start * @@ -452,8 +428,6 @@ static int jsonpath_parse_substring(const char *start, int *len) /****************************************************************************** * * - * Function: jsonpath_parse_path * - * * * Purpose: parse jsonpath reference * * * * Parameters: start - [IN] the jsonpath start * @@ -482,8 +456,6 @@ static int jsonpath_parse_path(const char *start, int *len) /****************************************************************************** * * - * Function: jsonpath_parse_number * - * * * Purpose: parse number value * * * * Parameters: start - [IN] the number start * @@ -520,8 +492,6 @@ static int jsonpath_parse_number(const char *start, int *len) /****************************************************************************** * * - * Function: jsonpath_expression_next_token * - * * * Purpose: get next token in jsonpath expression * * * * Parameters: exprsesion - [IN] the jsonpath expression * @@ -676,8 +646,6 @@ out: /****************************************************************************** * * - * Function: jsonpath_parse_expression * - * * * Purpose: parse jsonpath filter expression in format * * * * Parameters: expression - [IN] the expression, including opening and * @@ -876,8 +844,6 @@ cleanup: /****************************************************************************** * * - * Function: jsonpath_parse_names * - * * * Purpose: parse a list of single or double quoted names, including trivial * * case when a single name is used * * * @@ -990,8 +956,6 @@ out: /****************************************************************************** * * - * Function: jsonpath_parse_indexes * - * * * Purpose: parse a list of array indexes or range start:end values * * case when a single name is used * * * @@ -1139,8 +1103,6 @@ out: /****************************************************************************** * * - * Function: jsonpath_parse_bracket_segment * - * * * Purpose: parse jsonpath bracket notation segment * * * * Parameters: start - [IN] the segment start * @@ -1197,8 +1159,6 @@ static int jsonpath_parse_bracket_segment(const char *start, zbx_jsonpath_t *jso /****************************************************************************** * * - * Function: jsonpath_parse_dot_segment * - * * * Purpose: parse jsonpath dot notation segment * * * * Parameters: start - [IN] the segment start * @@ -1274,8 +1234,6 @@ static int jsonpath_parse_dot_segment(const char *start, zbx_jsonpath_t *jsonpat /****************************************************************************** * * - * Function: jsonpath_parse_name_reference * - * * * Purpose: parse jsonpath name reference ~ * * * * Parameters: start - [IN] the segment start * @@ -1300,8 +1258,6 @@ static int jsonpath_parse_name_reference(const char *start, zbx_jsonpath_t *json /****************************************************************************** * * - * Function: jsonpath_pointer_to_jp * - * * * Purpose: convert a pointer to an object/array/value in json data to * * json parse structure * * * @@ -1328,8 +1284,6 @@ static int jsonpath_pointer_to_jp(const char *pnext, struct zbx_json_parse *jp) /****************************************************************************** * * - * Function: jsonpath_query_contents * - * * * Purpose: perform the rest of jsonpath query on json data * * * * Parameters: jp_root - [IN] the document root * @@ -1365,8 +1319,6 @@ static int jsonpath_query_contents(const struct zbx_json_parse *jp_root, const c /****************************************************************************** * * - * Function: jsonpath_query_next_segment * - * * * Purpose: query next segment * * * * Parameters: jp_root - [IN] the document root * @@ -1398,8 +1350,6 @@ static int jsonpath_query_next_segment(const struct zbx_json_parse *jp_root, con /****************************************************************************** * * - * Function: jsonpath_match_name * - * * * Purpose: match object value name against jsonpath segment name list * * * * Parameters: jp_root - [IN] the document root * @@ -1439,8 +1389,6 @@ static int jsonpath_match_name(const struct zbx_json_parse *jp_root, const char /****************************************************************************** * * - * Function: jsonpath_extract_value * - * * * Purpose: extract value from json data by the specified path * * * * Parameters: jp - [IN] the parent object * @@ -1487,8 +1435,6 @@ out: /****************************************************************************** * * - * Function: jsonpath_expression_to_str * - * * * Purpose: convert jsonpath expression to text format * * * * Parameters: expression - [IN] the jsonpath exprssion * @@ -1578,8 +1524,6 @@ static char *jsonpath_expression_to_str(zbx_jsonpath_expression_t *expression) /****************************************************************************** * * - * Function: jsonpath_set_expression_error * - * * * Purpose: set jsonpath expression error message * * * * Parameters: expression - [IN] the jsonpath exprssion * @@ -1604,8 +1548,6 @@ static void jsonpath_set_expression_error(zbx_jsonpath_expression_t *expression) /****************************************************************************** * * - * Function: jsonpath_variant_to_boolean * - * * * Purpose: convert variant value to 'boolean' (1, 0) * * * * Parameters: value - [IN/OUT] the value * @@ -1644,8 +1586,6 @@ static void jsonpath_variant_to_boolean(zbx_variant_t *value) /****************************************************************************** * * - * Function: jsonpath_regexp_match * - * * * Purpose: match text against regular expression * * * * Parameters: text - [IN] the text to match * @@ -1675,8 +1615,6 @@ static int jsonpath_regexp_match(const char *text, const char *pattern, double * /****************************************************************************** * * - * Function: jsonpath_match_expression * - * * * Purpose: match json array element/object value against jsonpath expression * * * * Parameters: jp_root - [IN] the document root * @@ -1908,8 +1846,6 @@ out: /****************************************************************************** * * - * Function: jsonpath_query_object * - * * * Purpose: query object fields for jsonpath segment match * * * * Parameters: jp_root - [IN] the document root * @@ -1958,8 +1894,6 @@ static int jsonpath_query_object(const struct zbx_json_parse *jp_root, const str /****************************************************************************** * * - * Function: jsonpath_match_index * - * * * Purpose: match array element against segment index list * * * * Parameters: jp_root - [IN] the document root * @@ -2004,8 +1938,6 @@ static int jsonpath_match_index(const struct zbx_json_parse *jp_root, const char /****************************************************************************** * * - * Function: jsonpath_match_range * - * * * Purpose: match array element against segment index range * * * * Parameters: jp_root - [IN] the document root * @@ -2046,8 +1978,6 @@ static int jsonpath_match_range(const struct zbx_json_parse *jp_root, const char /****************************************************************************** * * - * Function: jsonpath_query_array * - * * * Purpose: query array elements for jsonpath segment match * * * * Parameters: jp_root - [IN] the document root * @@ -2108,8 +2038,6 @@ static int jsonpath_query_array(const struct zbx_json_parse *jp_root, const stru /****************************************************************************** * * - * Function: jsonpath_extract_element * - * * * Purpose: extract JSON element value from data * * * * Parameters: ptr - [IN] pointer to the element to extract * @@ -2141,8 +2069,6 @@ static int jsonpath_extract_element(const char *ptr, char **element) /****************************************************************************** * * - * Function: jsonpath_extract_numeric_value * - * * * Purpose: extract numeric value from json data * * * * Parameters: ptr - [IN] pointer to the value to extract * @@ -2168,8 +2094,6 @@ static int jsonpath_extract_numeric_value(const char *ptr, double *value) /****************************************************************************** * * - * Function: jsonpath_apply_function * - * * * Purpose: apply jsonpath function to the extracted object list * * * * Parameters: objects - [IN] the matched json elements (name, value) * @@ -2324,8 +2248,6 @@ out: /****************************************************************************** * * - * Function: jsonpath_apply_functions * - * * * Purpose: apply jsonpath function to the extracted object list * * * * Parameters: jp_root - [IN] the document root * @@ -2386,8 +2308,6 @@ static int jsonpath_apply_functions(const struct zbx_json_parse *jp_root, const /****************************************************************************** * * - * Function: jsonpath_format_query_result * - * * * Purpose: format query result, depending on jsonpath type * * * * Parameters: objects - [IN] the matched json elements (name, value) * @@ -2442,8 +2362,6 @@ static int jsonpath_format_query_result(const zbx_vector_json_t *objects, zbx_js /****************************************************************************** * * - * Function: zbx_jsonpath_clear * - * * ******************************************************************************/ void zbx_jsonpath_clear(zbx_jsonpath_t *jsonpath) { @@ -2457,8 +2375,6 @@ void zbx_jsonpath_clear(zbx_jsonpath_t *jsonpath) /****************************************************************************** * * - * Function: zbx_jsonpath_compile * - * * * Purpose: compile jsonpath to be used in queries * * * * Parameters: path - [IN] the path to parse * @@ -2560,8 +2476,6 @@ int zbx_jsonpath_compile(const char *path, zbx_jsonpath_t *jsonpath) /****************************************************************************** * * - * Function: zbx_jsonpath_query * - * * * Purpose: perform jsonpath query on the specified json data * * * * Parameters: jp - [IN] the json data * diff --git a/src/libs/zbxlog/log.c b/src/libs/zbxlog/log.c index 74508a22d2a..cf70a0e505f 100644 --- a/src/libs/zbxlog/log.c +++ b/src/libs/zbxlog/log.c @@ -681,8 +681,6 @@ char *strerror_from_module(unsigned long error, const wchar_t *module) /****************************************************************************** * * - * Function: zbx_strlog_alloc * - * * * Purpose: log the message optionally appending to a string buffer * * * * Parameters: lebel - [IN] the log level * diff --git a/src/libs/zbxmedia/email.c b/src/libs/zbxmedia/email.c index 17faf25e2d6..aa547600b99 100644 --- a/src/libs/zbxmedia/email.c +++ b/src/libs/zbxmedia/email.c @@ -39,8 +39,6 @@ /****************************************************************************** * * - * Function: str_base64_encode_rfc2047 * - * * * Purpose: Encode a string into a base64 string as required by rfc2047. * * Used for encoding e-mail headers. * * * @@ -122,8 +120,6 @@ static int smtp_readln(zbx_socket_t *s, const char **buf) /******************************************************************************** * * - * Function: smtp_parse_mailbox * - * * * Purpose: 1. Extract a display name and an angle address from mailbox string * * for using in "MAIL FROM:", "RCPT TO:", "From:" and "To:" fields. * * 2. If the display name contains multibyte UTF-8 characters encode * @@ -795,8 +791,6 @@ out: /****************************************************************************** * * - * Function: zbx_mailaddr_free * - * * * Purpose: frees the mail address object * * * * Parameters: mailaddr - [IN] the mail address * diff --git a/src/libs/zbxmodules/modules.c b/src/libs/zbxmodules/modules.c index b1b92bc4667..f182df37346 100644 --- a/src/libs/zbxmodules/modules.c +++ b/src/libs/zbxmodules/modules.c @@ -43,8 +43,6 @@ zbx_history_log_cb_t *history_log_cbs = NULL; /****************************************************************************** * * - * Function: zbx_register_module_items * - * * * Purpose: add items supported by module * * * * Parameters: metrics - list of items supported by module * @@ -75,8 +73,6 @@ static int zbx_register_module_items(ZBX_METRIC *metrics, char *error, size_t ma /****************************************************************************** * * - * Function: zbx_register_module * - * * * Purpose: add module to the list of successfully loaded modules * * * ******************************************************************************/ @@ -94,8 +90,6 @@ static zbx_module_t *zbx_register_module(void *lib, char *name) /****************************************************************************** * * - * Function: zbx_register_history_write_cbs * - * * * Purpose: registers callback functions for history export * * * * Parameters: module - module pointer for later reference * @@ -212,8 +206,6 @@ static int zbx_module_compare_func(const void *d1, const void *d2) /****************************************************************************** * * - * Function: zbx_load_module * - * * * Purpose: load loadable module * * * * Parameters: path - directory where modules are located * @@ -322,8 +314,6 @@ fail: /****************************************************************************** * * - * Function: zbx_load_modules * - * * * Purpose: load loadable modules (dynamic libraries) * * * * Parameters: path - directory where modules are located * @@ -378,8 +368,6 @@ out: /****************************************************************************** * * - * Function: zbx_unload_module * - * * * Purpose: unload module and free allocated resources * * * ******************************************************************************/ @@ -403,8 +391,6 @@ static void zbx_unload_module(void *data) /****************************************************************************** * * - * Function: zbx_unload_modules * - * * * Purpose: Unload already loaded loadable modules (dynamic libraries). * * It is called on process shutdown. * * * diff --git a/src/libs/zbxnix/control.c b/src/libs/zbxnix/control.c index 248103c1216..df54a1ad569 100644 --- a/src/libs/zbxnix/control.c +++ b/src/libs/zbxnix/control.c @@ -109,8 +109,6 @@ static int parse_log_level_options(const char *opt, size_t len, unsigned int *sc /****************************************************************************** * * - * Function: parse_rtc_options * - * * * Purpose: parse runtime control options and create a runtime control * * message * * * diff --git a/src/libs/zbxnix/coredump.c b/src/libs/zbxnix/coredump.c index 50a0349c4f3..86b46b6246d 100644 --- a/src/libs/zbxnix/coredump.c +++ b/src/libs/zbxnix/coredump.c @@ -24,8 +24,6 @@ #if defined(HAVE_GNUTLS) || defined(HAVE_OPENSSL) /****************************************************************************** * * - * Function: zbx_coredump_disable * - * * * Purpose: disable core dump * * * * Return value: SUCCEED - core dump disabled * diff --git a/src/libs/zbxnix/daemon.c b/src/libs/zbxnix/daemon.c index 44f781aa646..c0441745d77 100644 --- a/src/libs/zbxnix/daemon.c +++ b/src/libs/zbxnix/daemon.c @@ -47,8 +47,6 @@ static void (*zbx_sigusr_handler)(int flags); #ifdef HAVE_SIGQUEUE /****************************************************************************** * * - * Function: common_sigusr_handler * - * * * Purpose: common SIGUSR1 handler for Zabbix processes * * * ******************************************************************************/ @@ -198,8 +196,6 @@ void zbx_set_sigusr_handler(void (*handler)(int flags)) /****************************************************************************** * * - * Function: user1_signal_handler * - * * * Purpose: handle user signal SIGUSR1 * * * ******************************************************************************/ @@ -276,8 +272,6 @@ static void user1_signal_handler(int sig, siginfo_t *siginfo, void *context) /****************************************************************************** * * - * Function: pipe_signal_handler * - * * * Purpose: handle pipe signal SIGPIPE * * * ******************************************************************************/ @@ -292,8 +286,6 @@ static void pipe_signal_handler(int sig, siginfo_t *siginfo, void *context) /****************************************************************************** * * - * Function: set_daemon_signal_handlers * - * * * Purpose: set the signal handlers used by daemons * * * ******************************************************************************/ @@ -315,8 +307,6 @@ static void set_daemon_signal_handlers(void) /****************************************************************************** * * - * Function: daemon_start * - * * * Purpose: init process as daemon * * * * Parameters: allow_root - allow root permission for application * diff --git a/src/libs/zbxnix/dshm.c b/src/libs/zbxnix/dshm.c index 8768cddf9f3..8fb0f5e545f 100644 --- a/src/libs/zbxnix/dshm.c +++ b/src/libs/zbxnix/dshm.c @@ -25,8 +25,6 @@ extern char *CONFIG_FILE; /****************************************************************************** * * - * Function: zbx_dshm_create * - * * * Purpose: creates dynamic shared memory segment * * * * Parameters: shm - [OUT] the dynamic shared memory data * @@ -76,8 +74,6 @@ out: /****************************************************************************** * * - * Function: zbx_dshm_destroy * - * * * Purpose: destroys dynamic shared memory segment * * * * Parameters: shm - [IN] the dynamic shared memory data * @@ -116,8 +112,6 @@ out: /****************************************************************************** * * - * Function: zbx_dshm_lock * - * * ******************************************************************************/ void zbx_dshm_lock(zbx_dshm_t *shm) { @@ -126,8 +120,6 @@ void zbx_dshm_lock(zbx_dshm_t *shm) /****************************************************************************** * * - * Function: zbx_dshm_unlock * - * * ******************************************************************************/ void zbx_dshm_unlock(zbx_dshm_t *shm) { @@ -136,8 +128,6 @@ void zbx_dshm_unlock(zbx_dshm_t *shm) /****************************************************************************** * * - * Function: zbx_dshm_validate_ref * - * * * Purpose: validates local reference to dynamic shared memory segment * * * * Parameters: shm - [IN] the dynamic shared memory data * @@ -194,8 +184,6 @@ out: /****************************************************************************** * * - * Function: zbx_dshm_realloc * - * * * Purpose: reallocates dynamic shared memory segment * * * * Parameters: shm - [IN/OUT] the dynamic shared memory data * diff --git a/src/libs/zbxnix/ipc.c b/src/libs/zbxnix/ipc.c index 207e0d76e43..8912f356437 100644 --- a/src/libs/zbxnix/ipc.c +++ b/src/libs/zbxnix/ipc.c @@ -23,8 +23,6 @@ /****************************************************************************** * * - * Function: zbx_shm_create * - * * * Purpose: Create block of shared memory * * * * Parameters: size - size * @@ -51,8 +49,6 @@ int zbx_shm_create(size_t size) /****************************************************************************** * * - * Function: zbx_shm_destroy * - * * * Purpose: Destroy block of shared memory * * * * Parameters: shmid - Shared memory identifier * diff --git a/src/libs/zbxnix/sighandler.c b/src/libs/zbxnix/sighandler.c index b54deabaeff..c5828db4bc5 100644 --- a/src/libs/zbxnix/sighandler.c +++ b/src/libs/zbxnix/sighandler.c @@ -50,8 +50,6 @@ static void exit_with_failure(void) /****************************************************************************** * * - * Function: fatal_signal_handler * - * * * Purpose: handle fatal signals: SIGILL, SIGFPE, SIGSEGV, SIGBUS * * * ******************************************************************************/ @@ -65,8 +63,6 @@ static void fatal_signal_handler(int sig, siginfo_t *siginfo, void *context) /****************************************************************************** * * - * Function: metric_thread_signal_handler * - * * * Purpose: same as fatal_signal_handler() but customized for metric thread - * * does not log memory map * * * @@ -81,8 +77,6 @@ static void metric_thread_signal_handler(int sig, siginfo_t *siginfo, void *cont /****************************************************************************** * * - * Function: alarm_signal_handler * - * * * Purpose: handle alarm signal SIGALRM * * * ******************************************************************************/ @@ -95,8 +89,6 @@ static void alarm_signal_handler(int sig, siginfo_t *siginfo, void *context) /****************************************************************************** * * - * Function: terminate_signal_handler * - * * * Purpose: handle terminate signals: SIGHUP, SIGINT, SIGTERM, SIGUSR2 * * * ******************************************************************************/ @@ -144,8 +136,6 @@ static void terminate_signal_handler(int sig, siginfo_t *siginfo, void *context) /****************************************************************************** * * - * Function: child_signal_handler * - * * * Purpose: handle child signal SIGCHLD * * * ******************************************************************************/ @@ -170,8 +160,6 @@ static void child_signal_handler(int sig, siginfo_t *siginfo, void *context) /****************************************************************************** * * - * Function: zbx_set_common_signal_handlers * - * * * Purpose: set the commonly used signal handlers * * * ******************************************************************************/ @@ -203,8 +191,6 @@ void zbx_set_common_signal_handlers(void) /****************************************************************************** * * - * Function: zbx_set_exit_on_terminate * - * * * Purpose: make main process to exit on terminate signals * * * ******************************************************************************/ @@ -215,8 +201,6 @@ void zbx_set_exit_on_terminate(void) /****************************************************************************** * * - * Function: zbx_unset_exit_on_terminate * - * * * Purpose: make main process to set exit flag and continue to work on * * terminate signals * * * @@ -228,8 +212,6 @@ void zbx_unset_exit_on_terminate(void) /****************************************************************************** * * - * Function: zbx_set_child_signal_handler * - * * * Purpose: set the handlers for child process signals * * * ******************************************************************************/ @@ -253,8 +235,6 @@ void zbx_unset_child_signal_handler(void) /****************************************************************************** * * - * Function: zbx_set_metric_thread_signal_handler * - * * * Purpose: set the handlers for child process signals * * * ******************************************************************************/ @@ -276,8 +256,6 @@ void zbx_set_metric_thread_signal_handler(void) /****************************************************************************** * * - * Function: zbx_block_signals * - * * * Purpose: block signals to avoid interruption * * * ******************************************************************************/ @@ -298,8 +276,6 @@ void zbx_block_signals(sigset_t *orig_mask) /****************************************************************************** * * - * Function: zbx_unblock_signals * - * * * Purpose: unblock signals after blocking * * * ******************************************************************************/ diff --git a/src/libs/zbxprometheus/zbxprometheus.c b/src/libs/zbxprometheus/zbxprometheus.c index a52dab6ec76..d5b8bfd5cf8 100644 --- a/src/libs/zbxprometheus/zbxprometheus.c +++ b/src/libs/zbxprometheus/zbxprometheus.c @@ -131,8 +131,6 @@ zbx_prometheus_label_index_t; /****************************************************************************** * * - * Function: str_loc_dup * - * * * Purpose: allocates and copies substring at the specified location * * * * Parameters: src - [IN] the source string * @@ -156,8 +154,6 @@ static char *str_loc_dup(const char *src, const zbx_strloc_t *loc) /****************************************************************************** * * - * Function: str_loc_unquote_dyn * - * * * Purpose: unquotes substring at the specified location * * * * Parameters: src - [IN] the source string * @@ -202,8 +198,6 @@ static char *str_loc_unquote_dyn(const char *src, const zbx_strloc_t *loc) /****************************************************************************** * * - * Function: str_loc_unescape_hint_dyn * - * * * Purpose: unescapes HELP hint * * * * Parameters: src - [IN] the source string * @@ -250,8 +244,6 @@ static char *str_loc_unescape_hint_dyn(const char *src, const zbx_strloc_t *loc) /****************************************************************************** * * - * Function: str_loc_cmp * - * * * Purpose: compares substring at the specified location with the specified * * text * * * @@ -273,8 +265,6 @@ static int str_loc_cmp(const char *src, const zbx_strloc_t *loc, const char *tex /****************************************************************************** * * - * Function: str_loc_op * - * * * Purpose: parses condition operation at the specified location * * * * Parameters: src - [IN] the source string * @@ -305,8 +295,6 @@ static zbx_prometheus_condition_op_t str_loc_op(const char *data, const zbx_strl /****************************************************************************** * * - * Function: skip_spaces * - * * * Purpose: skips spaces * * * * Parameters: src - [IN] the source string * @@ -325,8 +313,6 @@ static size_t skip_spaces(const char *data, size_t pos) /****************************************************************************** * * - * Function: skip_row * - * * * Purpose: skips until beginning of the next row * * * * Parameters: src - [IN] the source string * @@ -347,8 +333,6 @@ static size_t skip_row(const char *data, size_t pos) /****************************************************************************** * * - * Function: parse_metric * - * * * Purpose: parses metric name * * * * Parameters: data - [IN] the source string * @@ -380,8 +364,6 @@ static int parse_metric(const char *data, size_t pos, zbx_strloc_t *loc) /****************************************************************************** * * - * Function: parse_label * - * * * Purpose: parses label name * * * * Parameters: data - [IN] the source string * @@ -413,8 +395,6 @@ static int parse_label(const char *data, size_t pos, zbx_strloc_t *loc) /****************************************************************************** * * - * Function: parse_label_op * - * * * Purpose: parses label operation * * * * Parameters: data - [IN] the source string * @@ -451,8 +431,6 @@ static int parse_label_op(const char *data, size_t pos, zbx_strloc_t *loc) /****************************************************************************** * * - * Function: parse_label_value * - * * * Purpose: parses label value * * * * Parameters: data - [IN] the source string * @@ -495,8 +473,6 @@ static int parse_label_value(const char *data, size_t pos, zbx_strloc_t *loc) /****************************************************************************** * * - * Function: parse_metric_op * - * * * Purpose: parses metric operation * * * * Parameters: data - [IN] the source string * @@ -525,8 +501,6 @@ static int parse_metric_op(const char *data, size_t pos, zbx_strloc_t *loc) /****************************************************************************** * * - * Function: str_copy_lowercase * - * * * Purpose: copies lowercase converted string to a buffer * * * * Parameters: dst - [OUT] the output buffer * @@ -557,8 +531,6 @@ static int str_copy_lowercase(char *dst, int size, const char *src, int len) /****************************************************************************** * * - * Function: parse_metric_value * - * * * Purpose: parses metric value * * * * Parameters: data - [IN] the source string * @@ -604,8 +576,6 @@ static int parse_metric_value(const char *data, size_t pos, zbx_strloc_t *loc) /****************************************************************************** * * - * Function: prometheus_condition_free * - * * ******************************************************************************/ static void prometheus_condition_free(zbx_prometheus_condition_t *condition) { @@ -616,8 +586,6 @@ static void prometheus_condition_free(zbx_prometheus_condition_t *condition) /****************************************************************************** * * - * Function: prometheus_condition_create * - * * * Purpose: allocates and initializes conditionect * * * * Parameters: key - [IN] the key to match * @@ -642,8 +610,6 @@ static zbx_prometheus_condition_t *prometheus_condition_create(char *key, char * /****************************************************************************** * * - * Function: prometheus_filter_clear * - * * * Purpose: clears resources allocated by prometheus filter * * * * Parameters: filter - [IN] the filter to clear * @@ -663,8 +629,6 @@ static void prometheus_filter_clear(zbx_prometheus_filter_t *filter) /****************************************************************************** * * - * Function: parse_condition * - * * * Purpose: parses condition data - key, pattern and operation * * * * Parameters: data - [IN] the filter data * @@ -698,8 +662,6 @@ static int parse_condition(const char *data, size_t pos, zbx_strloc_t *loc_key, /****************************************************************************** * * - * Function: prometheus_filter_parse_labels * - * * * Purpose: parses label conditions * * * * Parameters: filter - [IN/OUT] the filter * @@ -769,8 +731,6 @@ static int prometheus_filter_parse_labels(zbx_prometheus_filter_t *filter, const /****************************************************************************** * * - * Function: prometheus_filter_init * - * * * Purpose: initializes prometheus pattern filter from the specified data * * * * Parameters: filter - [IN/OUT] the filter * @@ -862,8 +822,6 @@ out: /****************************************************************************** * * - * Function: prometheus_label_free * - * * ******************************************************************************/ static void prometheus_label_free(zbx_prometheus_label_t *label) { @@ -874,8 +832,6 @@ static void prometheus_label_free(zbx_prometheus_label_t *label) /****************************************************************************** * * - * Function: prometheus_row_free * - * * ******************************************************************************/ static void prometheus_row_free(zbx_prometheus_row_t *row) { @@ -889,8 +845,6 @@ static void prometheus_row_free(zbx_prometheus_row_t *row) /****************************************************************************** * * - * Function: condition_match_key_value * - * * * Purpose: matches key,value against filter condition * * * * Parameters: condition - [IN] the condition * @@ -937,8 +891,6 @@ static int condition_match_key_value(const zbx_prometheus_condition_t *condition /****************************************************************************** * * - * Function: condition_match_metric_value * - * * * Purpose: matches metric value against filter condition * * * * Parameters: pattern - [IN] the condition * @@ -977,8 +929,6 @@ static int condition_match_metric_value(const char *pattern, const char *value) /****************************************************************************** * * - * Function: prometheus_metric_parse_labels * - * * * Purpose: parses metric labels * * * * Parameters: data - [IN] the metric data * @@ -1043,8 +993,6 @@ static int prometheus_metric_parse_labels(const char *data, size_t pos, zbx_vect /****************************************************************************** * * - * Function: prometheus_parse_row * - * * * Purpose: parses metric row * * * * Parameters: filter - [IN] the prometheus filter * @@ -1191,8 +1139,6 @@ out: /****************************************************************************** * * - * Function: parse_help * - * * * Purpose: parses HELP comment metric and help text * * * * Parameters: data - [IN] the prometheus data * @@ -1231,8 +1177,6 @@ static int parse_help(const char *data, size_t pos, zbx_strloc_t *loc_metric, zb /****************************************************************************** * * - * Function: parse_type * - * * * Purpose: parses TYPE comment metric and the type * * * * Parameters: data - [IN] the prometheus data * @@ -1268,8 +1212,6 @@ static int parse_type(const char *data, size_t pos, zbx_strloc_t *loc_metric, zb /****************************************************************************** * * - * Function: prometheus_register_hint * - * * * Purpose: registers TYPE/HELP comment hint to the specified metric * * * * Parameters: hints - [IN/OUT] the hint registry * @@ -1327,8 +1269,6 @@ static int prometheus_register_hint(zbx_hashset_t *hints, const char *data, char /****************************************************************************** * * - * Function: prometheus_parse_hint * - * * * Purpose: parses TYPE/HELP comment hint and registers it * * * * Parameters: filter - [IN] the prometheus filter * @@ -1403,8 +1343,6 @@ static int prometheus_parse_hint(zbx_prometheus_filter_t *filter, const char *da /****************************************************************************** * * - * Function: prometheus_parse_rows * - * * * Purpose: parses rows with metrics from prometheus data * * * * Parameters: filter - [IN] the prometheus filter * @@ -1488,8 +1426,6 @@ out: /****************************************************************************** * * - * Function: prometheus_extract_value * - * * * Purpose: extracts value from row * * * * Parameters: rows - [IN] the source rows * @@ -1569,8 +1505,6 @@ static int prometheus_extract_value(const zbx_vector_ptr_t *rows, const char *ou /****************************************************************************** * * - * Function: prometheus_aggregate_values * - * * * Purpose: aggregates row values * * * * Parameters: rows - [IN] the source rows * @@ -1642,8 +1576,6 @@ static int prometheus_aggregate_values(const zbx_vector_ptr_t *rows, const char /****************************************************************************** * * - * Function: prometheus_query_rows * - * * * Purpose: performs the specified request on rows * * * * Parameters: rows - [IN] the source rows * @@ -1667,8 +1599,6 @@ static int prometheus_query_rows(const zbx_vector_ptr_t *rows, const char *reque /****************************************************************************** * * - * Function: prometheus_filter_rows * - * * * Purpose: get rows matching the filter criteria * * * * Parameters: rows - [IN] the rows to filter * @@ -1730,8 +1660,6 @@ static void prometheus_filter_rows(zbx_vector_ptr_t *rows, zbx_prometheus_filter /****************************************************************************** * * - * Function: zbx_prometheus_init * - * * * Purpose: parse prometheus input and initialize cache * * * * Parameters: prom - [IN] the prometheus cache * @@ -1783,8 +1711,6 @@ static void prometheus_label_index_free(zbx_prometheus_label_index_t *label_inde /****************************************************************************** * * - * Function: zbx_prometheus_clear * - * * * Purpose: free resources allocated by prometheus cache * * * * Parameters: prom - [IN] the prometheus cache * @@ -1842,8 +1768,6 @@ static int prometheus_index_compare_func(const void *d1, const void *d2) /****************************************************************************** * * - * Function: prometheus_get_row_label * - * * * Purpose: get label from row by the specified name * * * * Parameters: row - [IN] the prometheus row * @@ -1870,8 +1794,6 @@ static zbx_prometheus_label_t *prometheus_get_row_label(zbx_prometheus_row_t *ro /****************************************************************************** * * - * Function: prometheus_get_indexed_rows_by_label * - * * * Purpose: get rows matching one filter label * * * * Parameters: prom - [IN] the prometheus cache * @@ -1949,8 +1871,6 @@ static int prometheus_get_indexed_rows_by_label(zbx_prometheus_t *prom, zbx_prom /****************************************************************************** * * - * Function: prometheus_validate_request * - * * * Purpose: validate prometheus pattern request and output * * * * Return value: SUCCEED - valid request and output combination * @@ -1980,8 +1900,6 @@ static int prometheus_validate_request(const char *request, const char *output, /****************************************************************************** * * - * Function: zbx_prometheus_pattern_ex * - * * * Purpose: extract value from prometheus cache by the specified filter * * * * Parameters: data - [IN] the prometheus cache * @@ -2038,8 +1956,6 @@ out: /****************************************************************************** * * - * Function: zbx_prometheus_pattern * - * * * Purpose: extracts value from prometheus data by the specified filter * * * * Parameters: data - [IN] the prometheus data * @@ -2098,8 +2014,6 @@ out: /****************************************************************************** * * - * Function: zbx_prometheus_to_json * - * * * Purpose: converts filtered prometheus data to json to be used with LLD * * * * Parameters: data - [IN] the prometheus data * diff --git a/src/libs/zbxregexp/zbxregexp.c b/src/libs/zbxregexp/zbxregexp.c index 5c1be8a6690..b498fcc30a0 100644 --- a/src/libs/zbxregexp/zbxregexp.c +++ b/src/libs/zbxregexp/zbxregexp.c @@ -71,8 +71,6 @@ zbx_regmatch_t; /****************************************************************************** * * - * Function: regexp_compile * - * * * Purpose: compiles a regular expression * * * * Parameters: * @@ -187,8 +185,6 @@ static int regexp_compile(const char *pattern, int flags, zbx_regexp_t **regexp, /******************************************************* * * - * Function: zbx_regexp_compile * - * * * Purpose: public wrapper for regexp_compile * * * *******************************************************/ @@ -203,8 +199,6 @@ int zbx_regexp_compile(const char *pattern, zbx_regexp_t **regexp, const char ** /******************************************************* * * - * Function: zbx_regexp_compile_ext * - * * * Purpose: public wrapper for regexp_compile * * * *******************************************************/ @@ -215,8 +209,6 @@ int zbx_regexp_compile_ext(const char *pattern, zbx_regexp_t **regexp, int flags /**************************************************************************************************** * * - * Function: regexp_prepare * - * * * Purpose: wrapper for zbx_regexp_compile. Caches and reuses the last used regexp. * * * ****************************************************************************************************/ @@ -270,8 +262,6 @@ static unsigned long int compute_recursion_limit(void) /*********************************************************************************** * * - * Function: regexp_exec * - * * * Purpose: wrapper for pcre_exec(), searches for a given pattern, specified by * * regexp, in the string * * * @@ -395,8 +385,6 @@ static int regexp_exec(const char *string, const zbx_regexp_t *regexp, int flags /****************************************************************************** * * - * Function: zbx_regexp_free * - * * * Purpose: wrapper for pcre_free * * * * Parameters: regexp - [IN] compiled regular expression * @@ -422,8 +410,6 @@ void zbx_regexp_free(zbx_regexp_t *regexp) /****************************************************************************** * * - * Function: zbx_regexp_match_precompiled * - * * * Purpose: checks if string matches a precompiled regular expression without * * returning matching groups * * * @@ -444,8 +430,6 @@ int zbx_regexp_match_precompiled(const char *string, const zbx_regexp_t *reg /**************************************************************************************************** * * - * Function: zbx_regexp * - * * * Purpose: compiles and executes a regexp * * * * Parameters: * @@ -497,8 +481,6 @@ char *zbx_regexp_match(const char *string, const char *pattern, int *len) /****************************************************************************** * * - * Function: strncpy_alloc * - * * * Purpose: zbx_strncpy_alloc with maximum allocated memory limit. * * * * Parameters: str - [IN/OUT] destination buffer pointer * @@ -519,8 +501,6 @@ static void strncpy_alloc(char **str, size_t *alloc_len, size_t *offset, const c /********************************************************************************* * * - * Function: regexp_sub_replace * - * * * Purpose: Constructs a string from the specified template and regexp match. * * * * Parameters: text - [IN] the input string. * @@ -639,8 +619,6 @@ out: /********************************************************************************* * * - * Function: regexp_sub * - * * * Purpose: Test if a string matches the specified regular expression. If yes * * then create a return value by substituting '\<n>' sequences in * * output template with the captured groups. * @@ -701,8 +679,6 @@ static int regexp_sub(const char *string, const char *pattern, const char *outpu /********************************************************************************* * * - * Function: zbx_mregexp_sub_precompiled * - * * * Purpose: Test if a string matches precompiled regular expression. If yes * * then create a return value by substituting '\<n>' sequences in * * output template with the captured groups. * @@ -752,8 +728,6 @@ int zbx_mregexp_sub_precompiled(const char *string, const zbx_regexp_t *regexp, /********************************************************************************* * * - * Function: zbx_regexp_sub * - * * * Purpose: Test if a string matches the specified regular expression. If yes * * then create a return value by substituting '\<n>' sequences in * * output template with the captured groups. * @@ -781,8 +755,6 @@ int zbx_regexp_sub(const char *string, const char *pattern, const char *output_t /********************************************************************************* * * - * Function: zbx_mregexp_sub * - * * * Purpose: This function is similar to zbx_regexp_sub() with exception that * * multiline matches are accepted. * * * @@ -794,8 +766,6 @@ int zbx_mregexp_sub(const char *string, const char *pattern, const char *output_ /********************************************************************************* * * - * Function: zbx_iregexp_sub * - * * * Purpose: This function is similar to zbx_regexp_sub() with exception that * * case insensitive matches are accepted. * * * @@ -807,8 +777,6 @@ int zbx_iregexp_sub(const char *string, const char *pattern, const char *output_ /****************************************************************************** * * - * Function: zbx_regexp_clean_expressions * - * * * Purpose: frees expression data retrieved by DCget_expressions function or * * prepared with add_regexp_ex() function calls * * * @@ -850,8 +818,6 @@ void add_regexp_ex(zbx_vector_ptr_t *regexps, const char *name, const char *expr /********************************************************************************** * * - * Function: regexp_match_ex_regsub * - * * * Purpose: Test if the string matches regular expression with the specified * * case sensitivity option and allocates output variable to store the * * result if necessary. * @@ -912,8 +878,6 @@ static int regexp_match_ex_regsub(const char *string, const char *pattern, int c /********************************************************************************** * * - * Function: regexp_match_ex_substring * - * * * Purpose: Test if the string contains substring with the specified case * * sensitivity option. * * * @@ -945,8 +909,6 @@ static int regexp_match_ex_substring(const char *string, const char *pattern, in /********************************************************************************** * * - * Function: regexp_match_ex_substring_list * - * * * Purpose: Test if the string contains a substring from list with the specified * * delimiter and case sensitivity option. * * * @@ -988,8 +950,6 @@ static int regexp_match_ex_substring_list(const char *string, char *pattern, int /********************************************************************************** * * - * Function: regexp_sub_ex * - * * * Purpose: Test if the string matches regular expression with the specified * * case sensitivity option and allocates output variable to store the * * result if necessary. * @@ -1145,8 +1105,6 @@ int zbx_global_regexp_exists(const char *name, const zbx_vector_ptr_t *regexps) /********************************************************************************** * * - * Function: zbx_regexp_escape_stringsize * - * * * Purpose: calculate a string size after symbols escaping * * * * Parameters: string - [IN] the string to check * @@ -1199,8 +1157,6 @@ static size_t zbx_regexp_escape_stringsize(const char *string) /********************************************************************************** * * - * Function: zbx_regexp_escape_string * - * * * Purpose: replace . \ + * ? [ ^ ] $ ( ) { } = ! < > | : - symbols in string * * with combination of \ and escaped symbol * * * @@ -1250,8 +1206,6 @@ static void zbx_regexp_escape_string(char *p, const char *string) /********************************************************************************** * * - * Function: zbx_regexp_escape * - * * * Purpose: escaping of symbols for using in regexp expression * * * * Parameters: string - [IN/OUT] the string to update * @@ -1274,8 +1228,6 @@ void zbx_regexp_escape(char **string) /********************************************************************************** * * - * Function: zbx_wildcard_minimize * - * * * Purpose: remove repeated wildcard characters from the expression * * * * Parameters: str - [IN/OUT] the string to update * @@ -1307,8 +1259,6 @@ void zbx_wildcard_minimize(char *str) /****************************************************************************** * * - * Function: zbx_wildcard_match * - * * * Purpose: Matches string value to specified wildcard. * * Asterisk (*) characters match to any characters of any length. * * * diff --git a/src/libs/zbxrtc/rtc.c b/src/libs/zbxrtc/rtc.c index f333fd8d192..486ae84fc2f 100644 --- a/src/libs/zbxrtc/rtc.c +++ b/src/libs/zbxrtc/rtc.c @@ -27,8 +27,6 @@ /****************************************************************************** * * - * Function: zbx_rtc_parse_loglevel_option * - * * * Purpose: parse loglevel runtime control option * * * * Parameters: opt - [IN] the runtime control option * diff --git a/src/libs/zbxrtc/rtc_client.c b/src/libs/zbxrtc/rtc_client.c index f5c6a698539..a0d08a1c627 100644 --- a/src/libs/zbxrtc/rtc_client.c +++ b/src/libs/zbxrtc/rtc_client.c @@ -26,8 +26,6 @@ extern int CONFIG_TIMEOUT; /****************************************************************************** * * - * Function: rtc_parse_log_level_parameter * - * * * Purpose: parse loglevel runtime control option * * * * Parameters: opt - [IN] the runtime control option * @@ -76,8 +74,6 @@ finish: /****************************************************************************** * * - * Function: rtc_parse_options * - * * * Purpose: parse runtime control options and create a runtime control * * message * * * @@ -160,8 +156,6 @@ static int rtc_parse_options(const char *opt, zbx_uint32_t *code, char **data, c /****************************************************************************** * * - * Function: zbx_rtc_process * - * * * Purpose: process runtime control option and print result * * * * Parameters: opt - [IN] the runtime control option * @@ -224,8 +218,6 @@ int zbx_rtc_open(zbx_ipc_async_socket_t *asocket, int timeout, char **error) /****************************************************************************** * * - * Function: zbx_rtc_notify_config_sync * - * * * Purpose: notify RTC service about finishing initial configuration sync * * * * Parameters: error - [OUT] error message * diff --git a/src/libs/zbxrtc/rtc_server.c b/src/libs/zbxrtc/rtc_server.c index 76a638b4901..67475d3f640 100644 --- a/src/libs/zbxrtc/rtc_server.c +++ b/src/libs/zbxrtc/rtc_server.c @@ -127,8 +127,6 @@ int rtc_parse_options_ex(const char *opt, zbx_uint32_t *code, char **data, char /****************************************************************************** * * - * Function: rtc_process_loglevel * - * * * Purpose: process loglevel runtime control option * * * * Parameters: direction - [IN] the loglevel change direction: * @@ -188,8 +186,6 @@ static int rtc_process_loglevel(int direction, const char *data, char **result) /****************************************************************************** * * - * Function: rtc_process_diaginfo * - * * * Purpose: process diaginfo runtime control option * * * * Parameters: data - [IN] the runtime control parameter (optional) * @@ -235,8 +231,6 @@ static void rtc_process_diaginfo(const char *data, char **result) /****************************************************************************** * * - * Function: rtc_ha_status * - * * * Purpose: process ha_status runtime command * * * ******************************************************************************/ @@ -339,8 +333,6 @@ static void rtc_ha_status(char **out) /****************************************************************************** * * - * Function: rtc_ha_remove_node * - * * * Purpose: process ha_remove_node runtime command * * * ******************************************************************************/ @@ -373,8 +365,6 @@ static void rtc_ha_remove_node(const char *data, char **out) /****************************************************************************** * * - * Function: rtc_ha_failover_delay * - * * * Purpose: process ha_failover_delay runtime command * * * ******************************************************************************/ @@ -416,8 +406,6 @@ static void rtc_ha_failover_delay(const char *data, char **out) } /****************************************************************************** * * - * Function: rtc_process_request_ex * - * * * Purpose: process runtime control option * * * * Parameters: code - [IN] the request code * diff --git a/src/libs/zbxrtc/rtc_service.c b/src/libs/zbxrtc/rtc_service.c index e7c61febecb..b1358222ced 100644 --- a/src/libs/zbxrtc/rtc_service.c +++ b/src/libs/zbxrtc/rtc_service.c @@ -27,8 +27,6 @@ /****************************************************************************** * * - * Function: rtc_change_service_loglevel * - * * * Purpose: change log level of service process * * * ******************************************************************************/ @@ -64,8 +62,6 @@ static void rtc_change_service_loglevel(int code) /****************************************************************************** * * - * Function: rtc_process_loglevel * - * * * Purpose: process loglevel runtime control option * * * * Parameters: code - [IN] the runtime control request code * @@ -134,8 +130,6 @@ static void rtc_process_loglevel(int code, const char *data, char **result) /****************************************************************************** * * - * Function: rtc_process_diaginfo * - * * * Purpose: process diaginfo runtime control option * * * * Parameters: data - [IN] the runtime control parameter (optional) * @@ -183,8 +177,6 @@ static void rtc_process_diaginfo(const char *data, char **result) /****************************************************************************** * * - * Function: rtc_process_request * - * * * Purpose: process runtime control option * * * * Parameters: code - [IN] the request code * @@ -244,8 +236,6 @@ static void rtc_process_request(int code, const unsigned char *data, char **resu /****************************************************************************** * * - * Function: zbx_rtc_init * - * * * Purpose: initialize runtime control service * * * ******************************************************************************/ @@ -256,8 +246,6 @@ int zbx_rtc_init(zbx_rtc_t *rtc ,char **error) /****************************************************************************** * * - * Function: zbx_rtc_dispatch * - * * * Purpose: accept and process runtime control request * * * ******************************************************************************/ @@ -292,8 +280,6 @@ void zbx_rtc_dispatch(zbx_ipc_client_t *client, zbx_ipc_message_t *message) /****************************************************************************** * * - * Function: zbx_rtc_wait_config_sync * - * * * Purpose: wait for configuration sync notification while optionally * * dispatching runtime control commands * * * diff --git a/src/libs/zbxself/selfmon.c b/src/libs/zbxself/selfmon.c index b06e0fa2226..a8336e98760 100644 --- a/src/libs/zbxself/selfmon.c +++ b/src/libs/zbxself/selfmon.c @@ -128,8 +128,6 @@ extern ZBX_THREAD_LOCAL int process_num; /****************************************************************************** * * - * Function: get_process_type_forks * - * * * Purpose: Returns number of processes depending on process type * * * * Parameters: proc_type - [IN] process type; ZBX_PROCESS_TYPE_* * @@ -221,8 +219,6 @@ int get_process_type_forks(unsigned char proc_type) #ifndef _WINDOWS /****************************************************************************** * * - * Function: init_selfmon_collector * - * * * Purpose: Initialize structures and prepare state * * for self-monitoring collector * * * @@ -294,8 +290,6 @@ out: /****************************************************************************** * * - * Function: free_selfmon_collector * - * * * Purpose: Free memory allocated for self-monitoring collector * * * * Author: Alexander Vladishev * @@ -322,8 +316,6 @@ void free_selfmon_collector(void) /****************************************************************************** * * - * Function: update_selfmon_counter * - * * * Parameters: state - [IN] new process state; ZBX_PROCESS_STATE_* * * * * Author: Alexander Vladishev * @@ -393,8 +385,6 @@ void update_selfmon_counter(unsigned char state) /****************************************************************************** * * - * Function: collect_selfmon_stats * - * * * Author: Alexander Vladishev * * * ******************************************************************************/ @@ -474,8 +464,6 @@ out: /****************************************************************************** * * - * Function: get_selfmon_stats * - * * * Purpose: calculate statistics for selected process * * * * Parameters: proc_type - [IN] type of process; ZBX_PROCESS_TYPE_* * @@ -573,8 +561,6 @@ unlock: /****************************************************************************** * * - * Function: zbx_get_all_process_stats * - * * * Purpose: retrieves internal metrics of all running processes based on * * process type * * * @@ -676,8 +662,6 @@ static int sleep_remains; /****************************************************************************** * * - * Function: zbx_sleep_loop * - * * * Purpose: sleeping process * * * * Parameters: sleeptime - [IN] required sleeptime, in seconds * diff --git a/src/libs/zbxself/selfmon_proxy.c b/src/libs/zbxself/selfmon_proxy.c index c80089301a3..0f353a147a9 100644 --- a/src/libs/zbxself/selfmon_proxy.c +++ b/src/libs/zbxself/selfmon_proxy.c @@ -23,8 +23,6 @@ /****************************************************************************** * * - * Function: get_component_process_type_forks * - * * * Purpose: Returns number of processes depending on process type * * * * Parameters: proc_type - [IN] process type; ZBX_PROCESS_TYPE_* * diff --git a/src/libs/zbxself/selfmon_server.c b/src/libs/zbxself/selfmon_server.c index f1852c9a4d1..57516561aac 100644 --- a/src/libs/zbxself/selfmon_server.c +++ b/src/libs/zbxself/selfmon_server.c @@ -26,8 +26,6 @@ extern int CONFIG_REPORTWRITER_FORKS; /****************************************************************************** * * - * Function: get_component_process_type_forks * - * * * Purpose: Returns number of processes depending on process type * * * * Parameters: proc_type - [IN] process type; ZBX_PROCESS_TYPE_* * diff --git a/src/libs/zbxserver/anomalystl.c b/src/libs/zbxserver/anomalystl.c index 5528880f490..d37fba3d6b1 100644 --- a/src/libs/zbxserver/anomalystl.c +++ b/src/libs/zbxserver/anomalystl.c @@ -33,8 +33,6 @@ ZBX_PTR_VECTOR_IMPL(VV, zbx_vector_history_record_t *) /******************************************************************************* * * - * Function: zbx_get_percentage_of_deviations_in_remainder * - * * * Purpose: finds how many values in stl remainder are outliers * * * * Parameters: remainder - [IN] stl remainder values vector * diff --git a/src/libs/zbxserver/evalfunc.c b/src/libs/zbxserver/evalfunc.c index ead77b3caec..a66f9fee8dc 100644 --- a/src/libs/zbxserver/evalfunc.c +++ b/src/libs/zbxserver/evalfunc.c @@ -52,8 +52,6 @@ ZBX_PTR_VECTOR_IMPL(valuemaps_ptr, zbx_valuemaps_t *) /****************************************************************************** * * - * Function: add_value_suffix_uptime * - * * * Purpose: Process suffix 'uptime' * * * * Parameters: value - value for adjusting * @@ -98,8 +96,6 @@ static void add_value_suffix_uptime(char *value, size_t max_len) /****************************************************************************** * * - * Function: add_value_suffix_s * - * * * Purpose: Process suffix 's' * * * * Parameters: value - value for adjusting * @@ -185,8 +181,6 @@ clean: /****************************************************************************** * * - * Function: is_blacklisted_unit * - * * * Purpose: check if unit is blacklisted or not * * * * Parameters: unit - unit to check * @@ -210,8 +204,6 @@ static int is_blacklisted_unit(const char *unit) /****************************************************************************** * * - * Function: add_value_units_no_kmgt * - * * * Purpose: add only units to the value * * * * Parameters: value - value for adjusting * @@ -248,8 +240,6 @@ static void add_value_units_no_kmgt(char *value, size_t max_len, const char *uni /****************************************************************************** * * - * Function: add_value_units_with_kmgt * - * * * Purpose: add units with K,M,G,T prefix to the value * * * * Parameters: value - value for adjusting * @@ -315,8 +305,6 @@ static void add_value_units_with_kmgt(char *value, size_t max_len, const char *u /****************************************************************************** * * - * Function: add_value_suffix * - * * * Purpose: Add suffix for value * * * * Parameters: value - value for replacing * @@ -370,8 +358,6 @@ static void zbx_valuemaps_free(zbx_valuemaps_t *valuemap) /****************************************************************************** * * - * Function: evaluate_value_by_map * - * * * Purpose: replace value by mapping value * * * * Parameters: value - value for replacing * @@ -524,8 +510,6 @@ map_value: /****************************************************************************** * * - * Function: replace_value_by_map * - * * * Purpose: replace value by mapping value * * * * Parameters: value - value for replacing * @@ -584,8 +568,6 @@ clean: /****************************************************************************** * * - * Function: zbx_format_value * - * * * Purpose: replace value by value mapping or by units * * * * Parameters: value - [IN/OUT] value for replacing * @@ -620,8 +602,6 @@ void zbx_format_value(char *value, size_t max_len, zbx_uint64_t valuemapid, /****************************************************************************** * * - * Function: evaluatable_for_notsupported * - * * * Purpose: check is function to be evaluated for NOTSUPPORTED items * * * * Parameters: fn - [IN] function name * @@ -643,8 +623,6 @@ int zbx_evaluatable_for_notsupported(const char *fn) /****************************************************************************** * * - * Function: get_function_parameter_period * - * * * Purpose: get the value of sec|#num trigger function parameter * * * * Parameters: parameters - [IN] trigger function parameters * @@ -705,8 +683,6 @@ out: /****************************************************************************** * * - * Function: get_last_n_value * - * * * Purpose: get last Nth value defined by #num:now-timeshift first parameter * * * * Parameters: item - [IN] item (performance metric) * @@ -763,8 +739,6 @@ out: /****************************************************************************** * * - * Function: evaluate_LOGEVENTID * - * * * Purpose: evaluate function 'logeventid' for the item * * * * Parameters: value - [OUT] result * @@ -862,8 +836,6 @@ out: /****************************************************************************** * * - * Function: evaluate_LOGSOURCE * - * * * Purpose: evaluate function 'logsource' for the item * * * * Parameters: value - [OUT] result * @@ -956,8 +928,6 @@ out: /****************************************************************************** * * - * Function: evaluate_LOGSEVERITY * - * * * Purpose: evaluate function 'logseverity' for the item * * * * Parameters: value - [OUT] result * @@ -1206,8 +1176,6 @@ static void count_one_str(int *count, int op, const char *value, const char *pat /****************************************************************************** * * - * Function: evaluate_COUNT * - * * * Purpose: evaluate functions 'count' and 'find' for the item * * * * Parameters: value - [OUT] result * @@ -1553,8 +1521,6 @@ out: /****************************************************************************** * * - * Function: evaluate_SUM * - * * * Purpose: evaluate function 'sum' for the item * * * * Parameters: value - [OUT] result * @@ -1647,8 +1613,6 @@ out: /****************************************************************************** * * - * Function: evaluate_AVG * - * * * Purpose: evaluate function 'avg' for the item * * * * Parameters: value - [OUT] result * @@ -1748,8 +1712,6 @@ out: /****************************************************************************** * * - * Function: evaluate_LAST * - * * * Purpose: evaluate function 'last' for the item * * * * Parameters: value - [OUT] result * @@ -1783,8 +1745,6 @@ static int evaluate_LAST(zbx_variant_t *value, DC_ITEM *item, const char *parame /****************************************************************************** * * - * Function: evaluate_MIN * - * * * Purpose: evaluate function 'min' for the item * * * * Parameters: value - [OUT] result * @@ -1888,8 +1848,6 @@ out: /****************************************************************************** * * - * Function: evaluate_MAX * - * * * Purpose: evaluate function 'max' for the item * * * * Parameters: value - [OUT] * @@ -1994,8 +1952,6 @@ out: /****************************************************************************** * * - * Function: evaluate_PERCENTILE * - * * * Purpose: evaluate function 'percentile' for the item * * * * Parameters: value - [OUT] result * @@ -2102,8 +2058,6 @@ out: /****************************************************************************** * * - * Function: evaluate_NODATA * - * * * Purpose: evaluate function 'nodata' for the item * * * * Parameters: value - [OUT] result * @@ -2215,8 +2169,6 @@ out: /****************************************************************************** * * - * Function: evaluate_CHANGE * - * * * Purpose: evaluate function 'change' for the item * * * * Parameters: value - [OUT] result * @@ -2288,8 +2240,6 @@ out: /****************************************************************************** * * - * Function: evaluate_FUZZYTIME * - * * * Purpose: evaluate function 'fuzzytime' for the item * * * * Parameters: value - [OUT] result * @@ -2372,8 +2322,6 @@ out: /****************************************************************************** * * - * Function: evaluate_BITAND * - * * * Purpose: evaluate logical bitwise function 'and' for the item * * * * Parameters: value - [OUT] dynamic buffer,result * @@ -2441,8 +2389,6 @@ clean: /****************************************************************************** * * - * Function: evaluate_FORECAST * - * * * Purpose: evaluate function 'forecast' for the item * * * * Parameters: value - [OUT] result * @@ -2600,8 +2546,6 @@ out: /****************************************************************************** * * - * Function: evaluate_TIMELEFT * - * * * Purpose: evaluate function 'timeleft' for the item * * * * Parameters: value - [OUT] result * @@ -2819,8 +2763,6 @@ out: /****************************************************************************** * * - * Function: evaluate_TREND * - * * * Purpose: evaluate trend* functions for the item * * * * Parameters: value - [OUT] result * @@ -3041,8 +2983,6 @@ static int validate_params_and_get_data(DC_ITEM *item, const char *parameters, c /****************************************************************************** * * - * Function: evaluate_FIRST * - * * * Purpose: evaluate function 'first' for the item * * * * Parameters: value - [OUT] result * @@ -3150,8 +3090,6 @@ out: /****************************************************************************** * * - * Function: evaluate_MONO * - * * * Purpose: evaluate functions 'monoinc' and 'monodec' for the item * * * * Parameters: value - [OUT] result * @@ -3291,8 +3229,6 @@ out: /****************************************************************************** * * - * Function: evaluate_RATE * - * * * Purpose: evaluate functions 'rate' for the item * * * * Parameters: value - [OUT] result * @@ -3482,8 +3418,6 @@ int zbx_evaluate_RATE(zbx_variant_t *value, DC_ITEM *item, const char *parameter /****************************************************************************** * * - * Function: evaluate_CHANGECOUNT * - * * * Purpose: evaluate function 'changecount' for the item * * * * Parameters: value - [OUT] result * @@ -3643,8 +3577,6 @@ out: /****************************************************************************** * * - * Function: evaluate_BASELINE * - * * * Purpose: evaluate baseline* functions for the item * * * * Parameters: value - [OUT] the function result * @@ -3804,8 +3736,6 @@ static void history_to_dbl_vector(const zbx_history_record_t *v, int n, unsigned /****************************************************************************** * * - * Function: evaluate_statistical_func * - * * * Purpose: common operations for aggregate function calculation * * * * Parameters: value - [OUT] result * @@ -3860,8 +3790,6 @@ out: /****************************************************************************** * * - * Function: evaluate_function * - * * * Purpose: evaluate function * * * * Parameters: value - [OUT] dynamic buffer, result * @@ -4029,8 +3957,6 @@ int evaluate_function2(zbx_variant_t *value, DC_ITEM *item, const char *function /****************************************************************************** * * - * Function: zbx_is_trigger_function * - * * * Purpose: check if the specified function is a trigger function * * * * Parameters: name - [IN] the function name to check * diff --git a/src/libs/zbxserver/evalfunc_common.c b/src/libs/zbxserver/evalfunc_common.c index 2293d94e5b0..ae19f3d257b 100644 --- a/src/libs/zbxserver/evalfunc_common.c +++ b/src/libs/zbxserver/evalfunc_common.c @@ -101,8 +101,6 @@ out: /****************************************************************************** * * - * Function: get_function_parameter_hist_range * - * * * Purpose: get the value of sec|num + timeshift trigger function parameter * * * * Parameters: from - [IN] the function calculation time * diff --git a/src/libs/zbxserver/expression.c b/src/libs/zbxserver/expression.c index 07a55e45ee5..e715cf3a3e0 100644 --- a/src/libs/zbxserver/expression.c +++ b/src/libs/zbxserver/expression.c @@ -86,8 +86,6 @@ static int substitute_key_macros_impl(char **data, zbx_uint64_t *hostid, DC_ITEM /****************************************************************************** * * - * Function: get_trigger_severity_name * - * * * Purpose: get trigger severity name * * * * Parameters: trigger - [IN] a trigger data with priority field; * @@ -117,8 +115,6 @@ static int get_trigger_severity_name(unsigned char priority, char **replace_to) /****************************************************************************** * * - * Function: get_problem_update_actions * - * * * Purpose: get human readable list of problem update actions * * * * Parameters: ack - [IN] the acknowledge (problem update) data * @@ -202,8 +198,6 @@ static int get_problem_update_actions(const DB_ACKNOWLEDGE *ack, int actions, ch /****************************************************************************** * * - * Function: DBget_host_value * - * * * Purpose: request host name by hostid * * * * Return value: upon successful completion return SUCCEED * @@ -234,8 +228,6 @@ static int DBget_host_value(zbx_uint64_t hostid, char **replace_to, const char * /****************************************************************************** * * - * Function: DBget_templateid_by_triggerid * - * * * Purpose: get template trigger ID from which the trigger is inherited * * * * Return value: upon successful completion return SUCCEED * @@ -266,8 +258,6 @@ static int DBget_templateid_by_triggerid(zbx_uint64_t triggerid, zbx_uint64_t *t /****************************************************************************** * * - * Function: DBget_trigger_template_name * - * * * Purpose: get comma-space separated trigger template names in which * * the trigger is defined * * * @@ -383,8 +373,6 @@ out: /****************************************************************************** * * - * Function: DBget_trigger_hostgroup_name * - * * * Purpose: get comma-space separated host group names in which the trigger * * is defined * * * @@ -469,8 +457,6 @@ out: /****************************************************************************** * * - * Function: get_interface_value * - * * * Purpose: retrieve a particular value associated with the interface * * * * Return value: upon successful completion return SUCCEED * @@ -538,8 +524,6 @@ static int get_host_value(zbx_uint64_t itemid, char **replace_to, int request) /****************************************************************************** * * - * Function: zbx_substitute_macros_in_item_key * - * * * Purpose: get item key, replace macros in the key * * * * Parameters: dc_item - [IN] item information used in substitution * @@ -557,8 +541,6 @@ static void zbx_substitute_macros_in_item_key(DC_ITEM *dc_item, char **replace_t /****************************************************************************** * * - * Function: DBget_item_value * - * * * Purpose: retrieve a particular value associated with the item * * * * Return value: upon successful completion return SUCCEED * @@ -710,8 +692,6 @@ out: /****************************************************************************** * * - * Function: DBget_trigger_value * - * * * Purpose: retrieve a particular value associated with the trigger's * * N_functionid'th function * * * @@ -736,8 +716,6 @@ int DBget_trigger_value(const DB_TRIGGER *trigger, char **replace_to, int N_func /****************************************************************************** * * - * Function: DBget_trigger_event_count * - * * * Purpose: retrieve number of events (acknowledged or unacknowledged) for a * * trigger (in an OK or PROBLEM state) which generated an event * * * @@ -794,8 +772,6 @@ static int DBget_trigger_event_count(zbx_uint64_t triggerid, char **replace_to, /****************************************************************************** * * - * Function: DBget_dhost_value_by_event * - * * * Purpose: retrieve discovered host value by event and field name * * * * Parameters: * @@ -856,8 +832,6 @@ static int DBget_dhost_value_by_event(const DB_EVENT *event, char **replace_to, /****************************************************************************** * * - * Function: DBget_dchecks_value_by_event * - * * * Purpose: retrieve discovery rule check value by event and field name * * * * Return value: upon successful completion return SUCCEED * @@ -893,8 +867,6 @@ static int DBget_dchecks_value_by_event(const DB_EVENT *event, char **replace_to /****************************************************************************** * * - * Function: DBget_dservice_value_by_event * - * * * Purpose: retrieve discovered service value by event and field name * * * * Parameters: * @@ -935,8 +907,6 @@ static int DBget_dservice_value_by_event(const DB_EVENT *event, char **replace_t /****************************************************************************** * * - * Function: DBget_drule_value_by_event * - * * * Purpose: retrieve discovery rule value by event and field name * * * * Parameters: * @@ -986,8 +956,6 @@ static int DBget_drule_value_by_event(const DB_EVENT *event, char **replace_to, /****************************************************************************** * * - * Function: DBget_history_log_value * - * * * Purpose: retrieve a particular attribute of a log value * * * * Return value: upon successful completion return SUCCEED * @@ -1062,8 +1030,6 @@ out: /****************************************************************************** * * - * Function: DBitem_get_value * - * * * Purpose: retrieve item value by item id * * * * Parameters: * @@ -1120,8 +1086,6 @@ static int DBitem_get_value(zbx_uint64_t itemid, char **lastvalue, int raw, zbx_ /****************************************************************************** * * - * Function: DBitem_value * - * * * Purpose: retrieve item value by trigger expression and number of function * * * * Return value: upon successful completion return SUCCEED * @@ -1146,8 +1110,6 @@ static int DBitem_value(const DB_TRIGGER *trigger, char **value, int N_functioni /****************************************************************************** * * - * Function: DBitem_lastvalue * - * * * Purpose: retrieve item lastvalue by trigger expression * * and number of function * * * @@ -1172,8 +1134,6 @@ static int DBitem_lastvalue(const DB_TRIGGER *trigger, char **lastvalue, int N_f /****************************************************************************** * * - * Function: format_user_fullname * - * * * Purpose: formats full user name from name, surname and alias * * * * Parameters: name - [IN] the user name, can be empty string * @@ -1216,8 +1176,6 @@ static char *format_user_fullname(const char *name, const char *surname, const c /****************************************************************************** * * - * Function: get_escalation_history * - * * * Purpose: retrieve escalation history * * * ******************************************************************************/ @@ -1326,8 +1284,6 @@ static void get_escalation_history(zbx_uint64_t actionid, const DB_EVENT *event, /****************************************************************************** * * - * Function: get_event_update_history * - * * * Purpose: retrieve event acknowledges history * * * * Parameters: * @@ -1404,8 +1360,6 @@ static void get_event_update_history(const DB_EVENT *event, char **replace_to, c /****************************************************************************** * * - * Function: get_autoreg_value_by_event * - * * * Purpose: request value from autoreg_host table by event * * * * Parameters: * @@ -1834,8 +1788,6 @@ static inventory_field_t inventory_fields[] = /****************************************************************************** * * - * Function: get_action_value * - * * * Purpose: request action value by macro * * * * Return value: upon successful completion return SUCCEED * @@ -1870,8 +1822,6 @@ static int get_action_value(const char *macro, zbx_uint64_t actionid, char **rep /****************************************************************************** * * - * Function: get_host_inventory * - * * * Purpose: request host inventory value by macro and trigger * * * * Return value: upon successful completion return SUCCEED * @@ -1901,8 +1851,6 @@ static int get_host_inventory(const char *macro, const DB_TRIGGER *trigger, char /****************************************************************************** * * - * Function: get_host_inventory_by_itemid * - * * * Purpose: request host inventory value by macro and itemid * * * * Return value: upon successful completion return SUCCEED * @@ -1924,8 +1872,6 @@ static int get_host_inventory_by_itemid(const char *macro, zbx_uint64_t itemid, /****************************************************************************** * * - * Function: get_host_inventory_by_itemid * - * * * Purpose: request host inventory value by macro and hostid * * * * Return value: upon successful completion return SUCCEED * @@ -1947,8 +1893,6 @@ static int get_host_inventory_by_hostid(const char *macro, zbx_uint64_t hostid, /****************************************************************************** * * - * Function: compare_tags * - * * * Purpose: comparison function to sort tags by tag/value * * * ******************************************************************************/ @@ -1967,8 +1911,6 @@ static int compare_tags(const void *d1, const void *d2) /****************************************************************************** * * - * Function: get_event_tags * - * * * Purpose: format event tags string in format <tag1>[:<value1>], ... * * * * Parameters: event [IN] the event * @@ -2020,8 +1962,6 @@ static void get_event_tags(const DB_EVENT *event, char **replace_to) /****************************************************************************** * * - * Function: get_event_tags_json * - * * * Purpose: format event tags string in JSON format * * * * Parameters: event [IN] the event * @@ -2052,8 +1992,6 @@ static void get_event_tags_json(const DB_EVENT *event, char **replace_to) /****************************************************************************** * * - * Function: get_event_tag_by_name * - * * * Purpose: get event tag value by name * * * * Parameters: macro - [IN] the macro * @@ -2098,8 +2036,6 @@ static void get_event_tag_by_name(const char *text, const DB_EVENT *event, char /****************************************************************************** * * - * Function: get_recovery_event_value * - * * * Purpose: request recovery event value by macro * * * ******************************************************************************/ @@ -2141,8 +2077,6 @@ static void get_recovery_event_value(const char *macro, const DB_EVENT *r_event, /****************************************************************************** * * - * Function: get_current_event_value * - * * * Purpose: request current event value by macro * * * ******************************************************************************/ @@ -2161,8 +2095,6 @@ static void get_current_event_value(const char *macro, const DB_EVENT *event, ch /****************************************************************************** * * - * Function: get_event_value * - * * * Purpose: request event value by macro * * * ******************************************************************************/ @@ -2260,8 +2192,6 @@ static void get_event_value(const char *macro, const DB_EVENT *event, char **rep /****************************************************************************** * * - * Function: rootcause_free * - * * * Purpose: free memory allocated for root cause * * * ******************************************************************************/ @@ -2274,8 +2204,6 @@ static void rootcause_free(zbx_rootcause_t *rootcause) /****************************************************************************** * * - * Function: rootcause_compare * - * * * Purpose: compare root cause to sort by highest severity and host name * * * ******************************************************************************/ @@ -2288,8 +2216,6 @@ static int rootcause_compare(const zbx_rootcause_t *d1, const zbx_rootcause_t *d /****************************************************************************** * * - * Function: get_rootcause * - * * * Purpose: get root cause of service being in problem state * * * ******************************************************************************/ @@ -2346,8 +2272,6 @@ fail: /****************************************************************************** * * - * Function: get_history_log_value * - * * * Purpose: retrieve a particular attribute of a log value * * * * Return value: upon successful completion return SUCCEED * @@ -2399,8 +2323,6 @@ static int get_history_log_value(const char *m, const DB_TRIGGER *trigger, char /****************************************************************************** * * - * Function: is_indexed_macro * - * * * Purpose: check if a token contains indexed macro * * * ******************************************************************************/ @@ -2426,8 +2348,6 @@ static int is_indexed_macro(const char *str, const zbx_token_t *token) /****************************************************************************** * * - * Function: macro_in_list * - * * * Purpose: check if a macro in string is one of the list and extract index * * * * Parameters: str - [IN] string containing potential macro * @@ -2479,8 +2399,6 @@ static const char *macro_in_list(const char *str, zbx_strloc_t strloc, const cha /****************************************************************************** * * - * Function: func_macro_in_list * - * * * Purpose: check if a macro function one in the list for the macro * * * * Parameters: str - [IN] string containing potential macro * @@ -2527,8 +2445,6 @@ static const char *func_macro_in_list(const char *str, zbx_token_func_macro_t *f /****************************************************************************** * * - * Function: get_expression_macro_result * - * * * Purpose: calculate result of expression macro * * * * Return value: upon successful completion return SUCCEED * @@ -2587,8 +2503,6 @@ out: /****************************************************************************** * * - * Function: cache_item_hostid * - * * * Purpose: cache host identifier referenced by an item or a lld-rule * * * * Parameters: hostids - [OUT] the host identifier cache * @@ -2630,8 +2544,6 @@ static const char *zbx_dobject_status2str(int st) /****************************************************************************** * * - * Function: resolve_opdata * - * * * Purpose: resolve {EVENT.OPDATA} macro * * * ******************************************************************************/ @@ -2681,8 +2593,6 @@ static void resolve_opdata(const DB_EVENT *event, char **replace_to, const char /****************************************************************************** * * - * Function: resolve_user_macros * - * * * Purpose: resolve {USER.*} macros * * * ******************************************************************************/ @@ -2761,8 +2671,6 @@ static int resolve_host_target_macros(const char *m, const DC_HOST *dc_host, DC_ /****************************************************************************** * * - * Function: substitute_simple_macros_impl * - * * * Purpose: substitute simple macros in data string with real values * * * * Author: Eugene Grigorjev * @@ -4868,8 +4776,6 @@ zbx_trigger_func_position_t; /****************************************************************************** * * - * Function: expand_trigger_macros * - * * * Purpose: expand macros in a trigger expression * * * * Parameters: event - The trigger event structure * @@ -4905,8 +4811,6 @@ static int expand_trigger_macros(zbx_eval_context_t *ctx, const DB_EVENT *event, /****************************************************************************** * * - * Function: zbx_link_triggers_with_functions * - * * * Purpose: triggers links with functions * * * * Parameters: triggers_func_pos - [IN/OUT] pointer to the list of triggers * @@ -4957,8 +4861,6 @@ static void zbx_link_triggers_with_functions(zbx_vector_ptr_t *triggers_func_pos /****************************************************************************** * * - * Function: zbx_determine_items_in_expressions * - * * * Purpose: mark triggers that use one of the items in problem expression * * with ZBX_DC_TRIGGER_PROBLEM_EXPRESSION flag * * * @@ -5088,8 +4990,6 @@ static void func_clean(void *ptr) /****************************************************************************** * * - * Function: zbx_populate_function_items * - * * * Purpose: prepare hashset of functions to evaluate * * * * Parameters: functionids - [IN] function identifiers * @@ -5379,8 +5279,6 @@ static void zbx_substitute_functions_results(zbx_hashset_t *ifuncs, zbx_vector_p /****************************************************************************** * * - * Function: substitute_functions * - * * * Purpose: substitute expression functions with their values * * * * Parameters: triggers - [IN] vector of DC_TRIGGER pointers, sorted by * @@ -5431,8 +5329,6 @@ empty: /****************************************************************************** * * - * Function: prepare_triggers * - * * * Purpose: prepare triggers for evaluation * * * * Parameters: triggers - [IN] array of DC_TRIGGER pointers * @@ -5490,8 +5386,6 @@ static int evaluate_expression(zbx_eval_context_t *ctx, const zbx_timespec_t *ts /****************************************************************************** * * - * Function: evaluate_expressions * - * * * Purpose: evaluate trigger expressions * * * * Parameters: triggers - [IN] vector of DC_TRIGGER pointers, sorted by * @@ -5608,8 +5502,6 @@ void evaluate_expressions(zbx_vector_ptr_t *triggers, const zbx_vector_uint64_t /****************************************************************************** * * - * Function: process_lld_macro_token * - * * * Purpose: expand discovery macro in expression * * * * Parameters: data - [IN/OUT] the expression containing lld macro * @@ -5737,8 +5629,6 @@ static void process_lld_macro_token(char **data, zbx_token_t *token, int flags, /****************************************************************************** * * - * Function: process_user_macro_token * - * * * Purpose: expand discovery macro in user macro context * * * * Parameters: data - [IN/OUT] the expression containing lld macro * @@ -5792,8 +5682,6 @@ static int process_user_macro_token(char **data, zbx_token_t *token, const struc /****************************************************************************** * * - * Function: substitute_query_filter_lld_macros * - * * * Purpose: substitute lld macros in calculated item query filter * * * * Parameters: filter - [IN/OUT] the filter * @@ -5861,8 +5749,6 @@ out: /****************************************************************************** * * - * Function: substitute_item_query_macros * - * * * Purpose: substitute lld macros in history function item query argument * * /host/key?[filter] * * * @@ -5919,8 +5805,6 @@ out: /****************************************************************************** * * - * Function: zbx_substitute_expression_macros * - * * * Purpose: substitutes lld macros in an expression * * * * Parameters: data - [IN/OUT] the expression * @@ -5997,8 +5881,6 @@ out: /****************************************************************************** * * - * Function: process_expression_macro_token * - * * * Purpose: expand discovery macro in expression macro * * * * Parameters: data - [IN/OUT] the expression containing macro * @@ -6037,8 +5919,6 @@ static int process_expression_macro_token(char **data, zbx_token_t *token, const /****************************************************************************** * * - * Function: substitute_func_macro * - * * * Purpose: substitute lld macros in function macro parameters * * * * Parameters: data - [IN/OUT] pointer to a buffer * @@ -6090,8 +5970,6 @@ static int substitute_func_macro(char **data, zbx_token_t *token, const struct z /****************************************************************************** * * - * Function: substitute_lld_macros * - * * * Parameters: data - [IN/OUT] pointer to a buffer * * jp_row - [IN] discovery data * * flags - [IN] ZBX_MACRO_ANY - all LLD macros will be resolved * @@ -6191,8 +6069,6 @@ replace_key_param_data_t; /****************************************************************************** * * - * Function: replace_key_param * - * * * Comments: auxiliary function for substitute_key_macros() * * * ******************************************************************************/ @@ -6236,8 +6112,6 @@ static int replace_key_param_cb(const char *data, int key_type, int level, int n /****************************************************************************** * * - * Function: substitute_key_macros_impl * - * * * Purpose: safely substitutes macros in parameters of an item key and OID * * * * Example: key | macro | result | return * @@ -6306,8 +6180,6 @@ static int substitute_key_macros_impl(char **data, zbx_uint64_t *hostid, DC_ITEM /****************************************************************************** * * - * Function: substitute_function_lld_param * - * * * Purpose: substitute lld macros in function parameters * * * * Parameters: e - [IN] the function parameter list without * @@ -6412,8 +6284,6 @@ out: /****************************************************************************** * * - * Function: substitute_macros_in_json_pairs * - * * * Purpose: substitute LLD macros in JSON pairs * * * * Parameters: data - [IN/OUT] pointer to a buffer that JSON pair * @@ -6492,8 +6362,6 @@ exit: #ifdef HAVE_LIBXML2 /****************************************************************************** * * - * Function: substitute_macros_in_xml_elements * - * * * Comments: auxiliary function for substitute_macros_xml() * * * ******************************************************************************/ @@ -6593,8 +6461,6 @@ static void substitute_macros_in_xml_elements(const DC_ITEM *item, const struct /****************************************************************************** * * - * Function: substitute_macros_xml_impl * - * * * Purpose: substitute simple or LLD macros in XML text nodes, attributes of * * a node or in CDATA section, validate XML * * * @@ -6657,8 +6523,6 @@ exit: #ifdef HAVE_LIBXML2 /****************************************************************************** * * - * Function: libxml_handle_error * - * * * Purpose: libxml2 callback function for error handle * * * * Parameters: user_data - [IN/OUT] the user context * @@ -6688,8 +6552,6 @@ static void libxml_handle_error(void *user_data, xmlErrorPtr err) /****************************************************************************** * * - * Function: xml_xpath_check * - * * * Purpose: validate xpath string * * * * Parameters: xpath - [IN] the xpath value * @@ -6735,8 +6597,6 @@ int xml_xpath_check(const char *xpath, char *error, size_t errlen) /****************************************************************************** * * - * Function: substitute_simple_macros * - * * * Purpose: substitute_simple_macros with masked secret macros * * (default setting) * * * @@ -6753,8 +6613,6 @@ int substitute_simple_macros(const zbx_uint64_t *actionid, const DB_EVENT *event /****************************************************************************** * * - * Function: substitute_simple_macros_unmasked * - * * * Purpose: substitute_simple_macros with unmasked secret macros * * * ******************************************************************************/ @@ -6776,8 +6634,6 @@ int substitute_simple_macros_unmasked(const zbx_uint64_t *actionid, const DB_EVE /****************************************************************************** * * - * Function: substitute_macros_xml * - * * * substitute_macros_xml with masked secret macros * * * ******************************************************************************/ @@ -6789,8 +6645,6 @@ int substitute_macros_xml(char **data, const DC_ITEM *item, const struct zbx_jso /****************************************************************************** * * - * Function: substitute_macros_xml_unmasked * - * * * substitute_macros_xml with unmasked secret macros * * * ******************************************************************************/ @@ -6808,8 +6662,6 @@ int substitute_macros_xml_unmasked(char **data, const DC_ITEM *item, const struc /****************************************************************************** * * - * Function: substitute_key_macros * - * * * substitute_key_macros with masked secret macros * * * ******************************************************************************/ @@ -6821,8 +6673,6 @@ int substitute_key_macros(char **data, zbx_uint64_t *hostid, DC_ITEM *dc_item, c /****************************************************************************** * * - * Function: substitute_key_macros_unmasked * - * * * substitute_key_macros with unmasked secret macros * * * ******************************************************************************/ @@ -6841,8 +6691,6 @@ int substitute_key_macros_unmasked(char **data, zbx_uint64_t *hostid, DC_ITEM *d /****************************************************************************** * * - * Function: zbx_host_macro_index * - * * * Purpose: extract index from valid indexed host macro * * * * Return value: The index or -1 if it was not valid indexed host macro * diff --git a/src/libs/zbxserver/expression_eval.c b/src/libs/zbxserver/expression_eval.c index 81689c72345..afdbf4dfa5e 100644 --- a/src/libs/zbxserver/expression_eval.c +++ b/src/libs/zbxserver/expression_eval.c @@ -117,8 +117,6 @@ static void expression_query_free(zbx_expression_query_t *query) /****************************************************************************** * * - * Function: test_key_param_wildcard_cb * - * * * Purpose: check if key parameter is a wildcard '*' * * * ******************************************************************************/ @@ -144,8 +142,6 @@ static int test_key_param_wildcard_cb(const char *data, int key_type, int level, /****************************************************************************** * * - * Function: expression_create_query * - * * * Purpose: create expression item query from item query /host/key?[filter] * * * * Parameters: itemquery - [IN] the item query * @@ -199,8 +195,6 @@ static zbx_expression_query_t* expression_create_query(const char *itemquery) /****************************************************************************** * * - * Function: expression_group_free * - * * ******************************************************************************/ static void expression_group_free(zbx_expression_group_t *group) { @@ -211,8 +205,6 @@ static void expression_group_free(zbx_expression_group_t *group) /****************************************************************************** * * - * Function: expression_get_group * - * * * Purpose: get group from cache by name * * * * Parameters: eval - [IN] the evaluation data * @@ -247,8 +239,6 @@ static zbx_expression_group_t *expression_get_group(zbx_expression_eval_t *eval, /****************************************************************************** * * - * Function: expression_get_item * - * * * Purpose: get item from cache by itemid * * * * Parameters: eval - [IN] the evaluation data * @@ -283,8 +273,6 @@ static zbx_expression_item_t *expression_get_item(zbx_expression_eval_t *eval, z /****************************************************************************** * * - * Function: expression_item_free * - * * ******************************************************************************/ static void expression_item_free(zbx_expression_item_t *item) { @@ -295,8 +283,6 @@ static void expression_item_free(zbx_expression_item_t *item) /****************************************************************************** * * - * Function: expression_init_query_one * - * * * Purpose: initialize one item query * * * * Parameters: eval - [IN] the evaluation data * @@ -314,8 +300,6 @@ static void expression_init_query_one(zbx_expression_eval_t *eval, zbx_expressio /****************************************************************************** * * - * Function: replace_key_param_wildcard_cb * - * * * Purpose: replace wildcards '*'in key parameters with % and escape existing * * %, \ characters for SQL like operation * * * @@ -358,8 +342,6 @@ static int replace_key_param_wildcard_cb(const char *data, int key_type, int lev /****************************************************************************** * * - * Function: expression_match_item_key * - * * * Purpose: check if item key matches the pattern * * * * Parameters: item_key - [IN] the item key to match * @@ -408,8 +390,6 @@ zbx_expression_eval_many_t; /****************************************************************************** * * - * Function: expression_get_item_candidates * - * * * Purpose: get itemids + hostids of items that might match query based on * * host, key and filter groups * * * @@ -553,8 +533,6 @@ static void expression_get_item_candidates(zbx_expression_eval_t *eval, const zb /****************************************************************************** * * - * Function: expression_item_check_tag * - * * * Purpose: check if the item matches the tag * * * * Parameters: item - [IN] the item with tags * @@ -597,8 +575,6 @@ static int expression_item_check_tag(zbx_expression_item_t *item, const char *ta /****************************************************************************** * * - * Function: expression_eval_filter * - * * * Purpose: evaluate filter function * * * * Parameters: name - [IN] the function name (not zero terminated) * @@ -672,8 +648,6 @@ static int expression_eval_filter(const char *name, size_t len, int args_num, co /****************************************************************************** * * - * Function: expression_init_query_many * - * * * Purpose: initialize many item query * * * * Parameters: eval - [IN] the evaluation data * @@ -802,8 +776,6 @@ out: /****************************************************************************** * * - * Function: expression_cache_dcitems_hk * - * * * Purpose: cache items used in one item queries * * * * Parameters: eval - [IN] the evaluation data * @@ -861,8 +833,6 @@ static int expression_find_dcitem_by_itemid(const void *d1, const void *d2) /****************************************************************************** * * - * Function: expression_cache_dcitems * - * * * Purpose: cache items used in many item queries * * * * Parameters: eval - [IN] the evaluation data * @@ -940,8 +910,6 @@ static void expression_cache_dcitems(zbx_expression_eval_t *eval) /****************************************************************************** * * - * Function: expression_eval_one * - * * * Purpose: evaluate historical function for one item query * * * * Parameters: eval - [IN] the evaluation data * @@ -1110,8 +1078,6 @@ static int get_function_by_name(const char *name, size_t len) /****************************************************************************** * * - * Function: evaluate_history_func_min * - * * * Purpose: calculate minimum value from the history value vector * * * * Parameters: values - [IN] a vector containing history values * @@ -1144,8 +1110,6 @@ static void evaluate_history_func_min(zbx_vector_history_record_t *values, int v /****************************************************************************** * * - * Function: evaluate_history_func_max * - * * * Purpose: calculate maximum value from the history value vector * * * * Parameters: values - [IN] a vector containing history values * @@ -1178,8 +1142,6 @@ static void evaluate_history_func_max(zbx_vector_history_record_t *values, int v /****************************************************************************** * * - * Function: evaluate_history_func_sum * - * * * Purpose: calculate sum of values from the history value vector * * * * Parameters: values - [IN] a vector containing history values * @@ -1208,8 +1170,6 @@ static void evaluate_history_func_sum(zbx_vector_history_record_t *values, int v /****************************************************************************** * * - * Function: evaluate_history_func_avg * - * * * Purpose: calculate average value of values from the history value vector * * * * Parameters: values - [IN] a vector containing history values * @@ -1226,8 +1186,6 @@ static void evaluate_history_func_avg(zbx_vector_history_record_t *values, int v /****************************************************************************** * * - * Function: evaluate_history_func_count * - * * * Purpose: calculate number of values in value vector * * * * Parameters: values - [IN] a vector containing history values * @@ -1243,8 +1201,6 @@ static void evaluate_history_func_count(zbx_vector_history_record_t *values, dou /****************************************************************************** * * - * Function: evaluate_history_func_last * - * * * Purpose: calculate the last (newest) value in value vector * * * * Parameters: values - [IN] a vector containing history values * @@ -1261,8 +1217,6 @@ static void evaluate_history_func_last(zbx_vector_history_record_t *values, int /****************************************************************************** * * - * Function: evaluate_history_func * - * * * Purpose: calculate function with values from value vector * * * * Parameters: values - [IN] a vector containing history values * @@ -1304,8 +1258,6 @@ static void evaluate_history_func(zbx_vector_history_record_t *values, int value /****************************************************************************** * * - * Function: get_dcitem * - * * * Purpose: get item from cache by itemid * * * * Parameters: eval - [IN] the evaluation data * @@ -1326,8 +1278,6 @@ static DC_ITEM *get_dcitem(zbx_vector_ptr_t *dcitem_refs, zbx_uint64_t itemid) /****************************************************************************** * * - * Function: expression_eval_exists * - * * * Purpose: evaluate functions 'exists_foreach' and 'item_count' * * for multiple items * * * @@ -1384,8 +1334,6 @@ static void expression_eval_exists(zbx_expression_eval_t *eval, zbx_expression_q /****************************************************************************** * * - * Function: expression_eval_bucket_rate * - * * * Purpose: evaluate functions 'bucket_rate_foreach' for 'histogram_quantile' * * and evaluate functions 'bucket_percentile' * * * @@ -1566,8 +1514,6 @@ err: /****************************************************************************** * * - * Function: expression_eval_many * - * * * Purpose: evaluate historical function for multiple items (aggregate checks)* * * * Parameters: eval - [IN] the evaluation data * @@ -1710,8 +1656,6 @@ out: /****************************************************************************** * * - * Function: expression_eval_history * - * * * Purpose: evaluate historical function * * * * Parameters: name - [IN] the function name (not zero terminated) * @@ -1790,8 +1734,6 @@ out: /****************************************************************************** * * - * Function: expression_eval_common * - * * * Purpose: evaluate common function * * * * Parameters: name - [IN] the function name (not zero terminated) * @@ -1851,8 +1793,6 @@ static int expression_eval_common(const char *name, size_t len, int args_num, co /****************************************************************************** * * - * Function: expression_eval_init * - * * * Purpose: initialize expression evaluation data * * * * Parameters: eval - [IN] the evaluation data * @@ -1906,8 +1846,6 @@ void zbx_expression_eval_init(zbx_expression_eval_t *eval, int mode, zbx_eval_co /****************************************************************************** * * - * Function: expression_eval_clear * - * * * Purpose: free resources allocated by expression evaluation data * * * * Parameters: eval - [IN] the evaluation data * @@ -1944,8 +1882,6 @@ void zbx_expression_eval_clear(zbx_expression_eval_t *eval) /****************************************************************************** * * - * Function: zbx_expression_eval_resolve_item_hosts * - * * * Purpose: resolve calculated item formula empty and macro host references * * (// , {HOST.HOST}) to host names * * * @@ -1991,8 +1927,6 @@ static void host_index_free(zbx_host_index_t *index) /****************************************************************************** * * - * Function: zbx_expression_eval_resolve_trigger_hosts * - * * * Purpose: resolve expression macro empty and macro host references * * (// , {HOST.HOST}, {HOST.HOST<N>}) to host names * * * @@ -2050,8 +1984,6 @@ void zbx_expression_eval_resolve_trigger_hosts(zbx_expression_eval_t *eval, cons /****************************************************************************** * * - * Function: zbx_expression_eval_execute * - * * * Purpose: execute expression containing history functions * * * * Parameters: eval - [IN] the evaluation data * diff --git a/src/libs/zbxserver/macrofunc.c b/src/libs/zbxserver/macrofunc.c index af9ed8791d3..49ab156b926 100644 --- a/src/libs/zbxserver/macrofunc.c +++ b/src/libs/zbxserver/macrofunc.c @@ -24,8 +24,6 @@ /****************************************************************************** * * - * Function: macrofunc_regsub * - * * * Purpose: calculates regular expression substitution * * * * Parameters: params - [IN] the function parameters * @@ -57,8 +55,6 @@ static int macrofunc_regsub(char **params, size_t nparam, char **out) /****************************************************************************** * * - * Function: macrofunc_iregsub * - * * * Purpose: calculates case insensitive regular expression substitution * * * * Parameters: params - [IN] the function parameters * @@ -90,8 +86,6 @@ static int macrofunc_iregsub(char **params, size_t nparam, char **out) /****************************************************************************** * * - * Function: macrofunc_fmttime * - * * * Purpose: time formatting macro function * * * * Parameters: params - [IN] the function parameters * @@ -181,8 +175,6 @@ static int macrofunc_fmttime(char **params, size_t nparam, char **out) /****************************************************************************** * * - * Function: macrofunc_fmtnum * - * * * Purpose: number formatting macro function * * * * Parameters: params - [IN] the function data * @@ -223,8 +215,6 @@ static int macrofunc_fmtnum(char **params, size_t nparam, char **out) /****************************************************************************** * * - * Function: zbx_calculate_macro_function * - * * * Purpose: calculates macro function value * * * * Parameters: expression - [IN] expression containing macro function * diff --git a/src/libs/zbxserver/zabbix_stats.c b/src/libs/zbxserver/zabbix_stats.c index 56183420cda..c40293b8cbb 100644 --- a/src/libs/zbxserver/zabbix_stats.c +++ b/src/libs/zbxserver/zabbix_stats.c @@ -32,8 +32,6 @@ extern unsigned char program_type; /****************************************************************************** * * - * Function: zbx_send_zabbix_stats * - * * * Purpose: collects all metrics required for Zabbix stats request * * * * Parameters: json - [OUT] the json data * diff --git a/src/libs/zbxserver/zabbix_stats_proxy.c b/src/libs/zbxserver/zabbix_stats_proxy.c index 8422af873d1..8f0c8e846c2 100644 --- a/src/libs/zbxserver/zabbix_stats_proxy.c +++ b/src/libs/zbxserver/zabbix_stats_proxy.c @@ -23,8 +23,6 @@ /****************************************************************************** * * - * Function: zbx_get_zabbix_stats_ext * - * * * Purpose: get program type (proxy) specific internal statistics * * * * Parameters: param1 - [IN/OUT] the json data * diff --git a/src/libs/zbxserver/zabbix_stats_server.c b/src/libs/zbxserver/zabbix_stats_server.c index f79b35f5e91..d03da23e792 100644 --- a/src/libs/zbxserver/zabbix_stats_server.c +++ b/src/libs/zbxserver/zabbix_stats_server.c @@ -31,8 +31,6 @@ /****************************************************************************** * * - * Function: zbx_get_zabbix_stats_ext * - * * * Purpose: get program type (server) specific internal statistics * * * * Parameters: param1 - [IN/OUT] the json data * diff --git a/src/libs/zbxserver/zabbix_users.c b/src/libs/zbxserver/zabbix_users.c index cf2769bfd61..f0832982a92 100644 --- a/src/libs/zbxserver/zabbix_users.c +++ b/src/libs/zbxserver/zabbix_users.c @@ -24,8 +24,6 @@ /****************************************************************************** * * - * Function: check_perm2system * - * * * Purpose: Check user permissions to access system * * * * Parameters: userid - user ID * @@ -75,8 +73,6 @@ char *get_user_timezone(zbx_uint64_t userid) /****************************************************************************** * * - * Function: zbx_check_user_administration_permissions * - * * * Purpose: check if the user has specific or default access for * * administration actions * * * diff --git a/src/libs/zbxsys/mutexs.c b/src/libs/zbxsys/mutexs.c index a55e0f4579b..5882ba1d6e7 100644 --- a/src/libs/zbxsys/mutexs.c +++ b/src/libs/zbxsys/mutexs.c @@ -57,8 +57,6 @@ static int shm_id, locks_disabled; /****************************************************************************** * * - * Function: zbx_locks_create * - * * * Purpose: if pthread mutexes and read-write locks can be shared between * * processes then create them, otherwise fallback to System V * * semaphore operations * @@ -194,8 +192,6 @@ void zbx_locks_destroy(void) /****************************************************************************** * * - * Function: zbx_mutex_addr_get * - * * * Purpose: acquire address of the mutex * * * * Parameters: mutex_name - name of the mutex to return address for * @@ -214,8 +210,6 @@ zbx_mutex_t zbx_mutex_addr_get(zbx_mutex_name_t mutex_name) /****************************************************************************** * * - * Function: zbx_mutex_addr_get * - * * * Purpose: acquire address of the rwlock * * * * Parameters: rwlock_name - name of the rwlock to return address for * @@ -234,8 +228,6 @@ zbx_rwlock_t zbx_rwlock_addr_get(zbx_rwlock_name_t rwlock_name) /****************************************************************************** * * - * Function: zbx_rwlock_create * - * * * Purpose: read-write locks are created using zbx_locks_create() function * * this is only to obtain handle, if read write locks are not * * supported, then outputs numeric handle of mutex that can be used * @@ -262,8 +254,6 @@ int zbx_rwlock_create(zbx_rwlock_t *rwlock, zbx_rwlock_name_t name, char **error #ifdef HAVE_PTHREAD_PROCESS_SHARED /****************************************************************************** * * - * Function: __zbx_rwlock_wrlock * - * * * Purpose: acquire write lock for read-write lock (exclusive access) * * * * Parameters: rwlock - handle of read-write lock * @@ -286,8 +276,6 @@ void __zbx_rwlock_wrlock(const char *filename, int line, zbx_rwlock_t rwlock) /****************************************************************************** * * - * Function: __zbx_rwlock_rdlock * - * * * Purpose: acquire read lock for read-write lock (there can be many readers) * * * * Parameters: rwlock - handle of read-write lock * @@ -310,8 +298,6 @@ void __zbx_rwlock_rdlock(const char *filename, int line, zbx_rwlock_t rwlock) /****************************************************************************** * * - * Function: __zbx_rwlock_unlock * - * * * Purpose: unlock read-write lock * * * * Parameters: rwlock - handle of read-write lock * @@ -334,8 +320,6 @@ void __zbx_rwlock_unlock(const char *filename, int line, zbx_rwlock_t rwlock) /****************************************************************************** * * - * Function: zbx_rwlock_destroy * - * * * Purpose: Destroy read-write lock * * * * Parameters: rwlock - handle of read-write lock * @@ -352,8 +336,6 @@ void zbx_rwlock_destroy(zbx_rwlock_t *rwlock) /****************************************************************************** * * - * Function: zbx_locks_disable * - * * * Purpose: disable locks * * * ******************************************************************************/ @@ -365,8 +347,6 @@ void zbx_locks_disable(void) /****************************************************************************** * * - * Function: zbx_locks_enable * - * * * Purpose: enable locks * * * ******************************************************************************/ @@ -381,8 +361,6 @@ void zbx_locks_enable(void) /****************************************************************************** * * - * Function: zbx_mutex_create * - * * * Purpose: Create the mutex * * * * Parameters: mutex - handle of mutex * @@ -416,8 +394,6 @@ int zbx_mutex_create(zbx_mutex_t *mutex, zbx_mutex_name_t name, char **error) /****************************************************************************** * * - * Function: zbx_mutex_lock * - * * * Purpose: Waits until the mutex is in the signalled state * * * * Parameters: mutex - handle of mutex * @@ -490,8 +466,6 @@ void __zbx_mutex_lock(const char *filename, int line, zbx_mutex_t mutex) /****************************************************************************** * * - * Function: zbx_mutex_unlock * - * * * Purpose: Unlock the mutex * * * * Parameters: mutex - handle of mutex * @@ -546,8 +520,6 @@ void __zbx_mutex_unlock(const char *filename, int line, zbx_mutex_t mutex) /****************************************************************************** * * - * Function: zbx_mutex_destroy * - * * * Purpose: Destroy the mutex * * * * Parameters: mutex - handle of mutex * @@ -570,8 +542,6 @@ void zbx_mutex_destroy(zbx_mutex_t *mutex) #ifdef _WINDOWS /****************************************************************************** * * - * Function: zbx_mutex_create_per_process_name * - * * * Purpose: Appends PID to the prefix of the mutex * * * * Parameters: prefix - mutex type * diff --git a/src/libs/zbxsys/threads.c b/src/libs/zbxsys/threads.c index d13ac89ce3c..f07bdaa78b3 100644 --- a/src/libs/zbxsys/threads.c +++ b/src/libs/zbxsys/threads.c @@ -45,8 +45,6 @@ void CALLBACK ZBXEndThread(ULONG_PTR dwParam) #else /****************************************************************************** * * - * Function: zbx_fork * - * * * Purpose: Flush stdout and stderr before forking * * * * Return value: same as system fork() function * @@ -63,8 +61,6 @@ int zbx_fork(void) /****************************************************************************** * * - * Function: zbx_child_fork * - * * * Purpose: fork from master process and set SIGCHLD handler * * * * Return value: same as system fork() function * @@ -102,8 +98,6 @@ void zbx_child_fork(pid_t *pid) /****************************************************************************** * * - * Function: zbx_thread_start * - * * * Purpose: Start the handled function as "thread" * * * * Parameters: handler - [IN] new thread starts execution from this * @@ -150,8 +144,6 @@ void zbx_thread_start(ZBX_THREAD_ENTRY_POINTER(handler), zbx_thread_args_t *thre /****************************************************************************** * * - * Function: zbx_thread_wait * - * * * Purpose: Waits until the "thread" is in the signalled state * * * * Parameters: "thread" handle * @@ -211,8 +203,6 @@ int zbx_thread_wait(ZBX_THREAD_HANDLE thread) /****************************************************************************** * * - * Function: threads_kill * - * * * Purpose: sends termination signal to "threads" * * * * Parameters: threads - [IN] handles to threads or processes * @@ -249,8 +239,6 @@ static void threads_kill(ZBX_THREAD_HANDLE *threads, int threads_num, const int /****************************************************************************** * * - * Function: zbx_threads_wait * - * * * Purpose: Waits until the "threads" are in the signalled state * * * * Parameters: "threads" handles * diff --git a/src/libs/zbxsysinfo/agent/modbus.c b/src/libs/zbxsysinfo/agent/modbus.c index b551acba221..1b979bba845 100644 --- a/src/libs/zbxsysinfo/agent/modbus.c +++ b/src/libs/zbxsysinfo/agent/modbus.c @@ -127,8 +127,6 @@ static void set_serial_params_default(zbx_modbus_connection_serial *serial_param /****************************************************************************** * * - * Function: result_to_str * - * * * Purpose: converts result to a string * * * * Parameters: buf - [IN] modbus data * @@ -227,8 +225,6 @@ end: /****************************************************************************** * * - * Function: result_to_str_bit * - * * * Purpose: converts bits result to a string * * * * Parameters: buf8 - [IN] modbus data * @@ -254,8 +250,6 @@ static char *result_to_str_bit(uint8_t *buf8, unsigned short count) /****************************************************************************** * * - * Function: set_result * - * * * Purpose: set result * * * * Parameters: buf - [IN] modbus data * @@ -311,8 +305,6 @@ static void set_result(uint16_t *buf, modbus_datatype_t type, modbus_endianness_ /****************************************************************************** * * - * Function: get_total_count * - * * * Purpose: get total count of bits/registers plus offset * * * * Parameters: count - [IN] count of sequenced same data type values to * @@ -354,8 +346,6 @@ static unsigned int get_total_count(unsigned short count, unsigned short offset, /****************************************************************************** * * - * Function: parse_params * - * * * Purpose: parse serial connection parameters * * * * Parameters: params - [IN] string holding parameters * @@ -394,8 +384,6 @@ static int parse_params(char *params, zbx_modbus_connection_serial *serial_param /****************************************************************************** * * - * Function: endpoint_parse * - * * * Purpose: parse endpoint * * * * Parameters: endpoint_str - [IN] string holding endpoint * @@ -483,8 +471,6 @@ static int endpoint_parse(char *endpoint_str, zbx_modbus_endpoint_t *endpoint) /****************************************************************************** * * - * Function: modbus_read_data * - * * * Purpose: request and read modbus data * * * * Parameters: endpoint - [IN] endpoint * @@ -856,8 +842,6 @@ err: /****************************************************************************** * * - * Function: zbx_init_modbus * - * * * Purpose: create modbus mutex * * * * Parameters: error - [OUT] error message in case of failure * diff --git a/src/libs/zbxsysinfo/common/dir.c b/src/libs/zbxsysinfo/common/dir.c index af69f35d47a..b6175814f42 100644 --- a/src/libs/zbxsysinfo/common/dir.c +++ b/src/libs/zbxsysinfo/common/dir.c @@ -29,8 +29,6 @@ /****************************************************************************** * * - * Function: filename_matches * - * * * Purpose: checks if filename matches the include-regexp and doesn't match * * the exclude-regexp * * * @@ -52,8 +50,6 @@ static int filename_matches(const char *fname, const zbx_regexp_t *regex_incl, c /****************************************************************************** * * - * Function: queue_directory * - * * * Purpose: adds directory to processing queue after checking if current * * depth is less than 'max_depth' * * * @@ -88,8 +84,6 @@ static int queue_directory(zbx_vector_ptr_t *list, char *path, int depth, int ma /****************************************************************************** * * - * Function: compare_descriptors * - * * * Purpose: compares two zbx_file_descriptor_t values to perform search * * within descriptor vector * * * @@ -415,8 +409,6 @@ static void descriptors_vector_destroy(zbx_vector_ptr_t *descriptors) /****************************************************************************** * * - * Function: has_timed_out * - * * * Purpose: Checks if timeout has occurred. If it is, thread should * * immediately stop whatever it is doing, clean up everything and * * return SYSINFO_RET_FAIL. * @@ -866,8 +858,6 @@ int VFS_DIR_SIZE(AGENT_REQUEST *request, AGENT_RESULT *result) /****************************************************************************** * * - * Function: vfs_dir_info * - * * * Purpose: counts or lists files in directory, subject to regexp, type and * * depth filters * * * diff --git a/src/libs/zbxsysinfo/common/system.c b/src/libs/zbxsysinfo/common/system.c index c8a9c7561ea..09c8a526a41 100644 --- a/src/libs/zbxsysinfo/common/system.c +++ b/src/libs/zbxsysinfo/common/system.c @@ -27,8 +27,6 @@ /****************************************************************************** * * - * Function: SYSTEM_LOCALTIME * - * * * Comments: Thread-safe * * * ******************************************************************************/ diff --git a/src/libs/zbxsysinfo/common/zabbix_stats.c b/src/libs/zbxsysinfo/common/zabbix_stats.c index ecfd49d22ce..aea44ac7a1a 100644 --- a/src/libs/zbxsysinfo/common/zabbix_stats.c +++ b/src/libs/zbxsysinfo/common/zabbix_stats.c @@ -25,8 +25,6 @@ /****************************************************************************** * * - * Function: check_response * - * * * Purpose: Check whether JSON response is "success" or "failed" * * * * Parameters: response - [IN] the request * @@ -68,8 +66,6 @@ static int check_response(const char *response, AGENT_RESULT *result) /****************************************************************************** * * - * Function: get_remote_zabbix_stats * - * * * Purpose: send Zabbix stats request and receive the result data * * * * Parameters: json - [IN] the request * @@ -121,8 +117,6 @@ static void get_remote_zabbix_stats(const struct zbx_json *json, const char *ip, /****************************************************************************** * * - * Function: zbx_get_remote_zabbix_stats * - * * * Purpose: create Zabbix stats request * * * * Parameters: ip - [IN] external Zabbix instance hostname * @@ -149,8 +143,6 @@ int zbx_get_remote_zabbix_stats(const char *ip, unsigned short port, AGENT_RESUL /****************************************************************************** * * - * Function: zbx_get_remote_zabbix_stats_queue * - * * * Purpose: create Zabbix stats queue request * * * * Parameters: ip - [IN] external Zabbix instance hostname * diff --git a/src/libs/zbxsysinfo/linux/net.c b/src/libs/zbxsysinfo/linux/net.c index 4b0ad6c8e22..0478592f09a 100644 --- a/src/libs/zbxsysinfo/linux/net.c +++ b/src/libs/zbxsysinfo/linux/net.c @@ -294,8 +294,6 @@ static int get_net_stat(const char *if_name, net_stat_t *result, char **error) /****************************************************************************** * * - * Function: proc_read_tcp_listen * - * * * Purpose: reads /proc/net/tcp(6) file by chunks until the last line in * * in buffer has non-listening socket state * * * @@ -379,8 +377,6 @@ out: /****************************************************************************** * * - * Function: proc_read_file * - * * * Purpose: reads whole file into a buffer in a single read operation * * * * Parameters: filename - [IN] the file to read * diff --git a/src/libs/zbxsysinfo/linux/proc.c b/src/libs/zbxsysinfo/linux/proc.c index a79627a174f..e8d19c2cc8b 100644 --- a/src/libs/zbxsysinfo/linux/proc.c +++ b/src/libs/zbxsysinfo/linux/proc.c @@ -43,8 +43,6 @@ zbx_sysinfo_proc_t; /****************************************************************************** * * - * Function: zbx_sysinfo_proc_free * - * * * Purpose: frees process data structure * * * ******************************************************************************/ @@ -237,8 +235,6 @@ static int check_procstate(FILE *f_stat, int zbx_proc_stat) /****************************************************************************** * * - * Function: byte_value_from_proc_file * - * * * Purpose: Read amount of memory in bytes from a string in /proc file. * * For example, reading "VmSize: 176712 kB" from /proc/1/status * * will produce a result 176712*1024 = 180953088 bytes * @@ -833,8 +829,6 @@ out: /****************************************************************************** * * - * Function: proc_get_process_name * - * * * Purpose: returns process name * * * * Parameters: pid - [IN] the process identifier * @@ -878,8 +872,6 @@ static int proc_get_process_name(pid_t pid, char **procname) /****************************************************************************** * * - * Function: proc_get_process_cmdline * - * * * Purpose: returns process command line * * * * Parameters: pid - [IN] the process identifier * @@ -945,8 +937,6 @@ static int proc_get_process_cmdline(pid_t pid, char **cmdline, size_t *cmdline_n /****************************************************************************** * * - * Function: proc_get_process_uid * - * * * Purpose: returns process user identifier * * * * Parameters: pid - [IN] the process identifier * @@ -973,8 +963,6 @@ static int proc_get_process_uid(pid_t pid, uid_t *uid) /****************************************************************************** * * - * Function: proc_read_value * - * * * Purpose: read 64 bit unsigned space or zero character terminated integer * * from a text string * * * @@ -1002,8 +990,6 @@ static int proc_read_value(const char *ptr, zbx_uint64_t *value) /****************************************************************************** * * - * Function: proc_read_cpu_util * - * * * Purpose: reads process cpu utilization values from /proc/[pid]/stat file * * * * Parameters: procutil - [IN/OUT] the process cpu utilization data * @@ -1085,8 +1071,6 @@ out: /****************************************************************************** * * - * Function: proc_match_name * - * * * Purpose: checks if the process name matches filter * * * ******************************************************************************/ @@ -1106,8 +1090,6 @@ static int proc_match_name(const zbx_sysinfo_proc_t *proc, const char *procname) /****************************************************************************** * * - * Function: proc_match_user * - * * * Purpose: checks if the process user matches filter * * * ******************************************************************************/ @@ -1124,8 +1106,6 @@ static int proc_match_user(const zbx_sysinfo_proc_t *proc, const struct passwd * /****************************************************************************** * * - * Function: proc_match_cmdline * - * * * Purpose: checks if the process command line matches filter * * * ******************************************************************************/ @@ -1142,8 +1122,6 @@ static int proc_match_cmdline(const zbx_sysinfo_proc_t *proc, const char *cmdlin /****************************************************************************** * * - * Function: zbx_proc_get_process_stats * - * * * Purpose: get process cpu utilization data * * * * Parameters: procs - [IN/OUT] an array of process utilization data * @@ -1164,8 +1142,6 @@ void zbx_proc_get_process_stats(zbx_procstat_util_t *procs, int procs_num) /****************************************************************************** * * - * Function: proc_create * - * * * Purpose: create process object with the specified properties * * * * Parameters: pid - [IN] the process identifier * @@ -1238,8 +1214,6 @@ out: /****************************************************************************** * * - * Function: zbx_proc_get_processes * - * * * Purpose: get system processes * * * * Parameters: processes - [OUT] the system processes * @@ -1286,8 +1260,6 @@ out: /****************************************************************************** * * - * Function: zbx_proc_free_processes * - * * * Purpose: frees process vector read by zbx_proc_get_processes function * * * * Parameters: processes - [IN/OUT] the process vector to free * @@ -1300,8 +1272,6 @@ void zbx_proc_free_processes(zbx_vector_ptr_t *processes) /****************************************************************************** * * - * Function: zbx_proc_get_matching_pids * - * * * Purpose: get pids matching the specified process name, user name and * * command line * * * diff --git a/src/libs/zbxsysinfo/linux/sensors.c b/src/libs/zbxsysinfo/linux/sensors.c index 80a20104069..99c51f49adf 100644 --- a/src/libs/zbxsysinfo/linux/sensors.c +++ b/src/libs/zbxsysinfo/linux/sensors.c @@ -78,8 +78,6 @@ static void count_sensor(int do_task, const char *filename, double *aggr, int *c #ifndef KERNEL_2_4 /********************************************************************************* * * - * Function: sysfs_read_attr * - * * * Purpose: locate and read the name attribute of a sensor from sysfs * * * * Parameters: device - [IN] the path to sensor data in sysfs * diff --git a/src/libs/zbxsysinfo/solaris/proc.c b/src/libs/zbxsysinfo/solaris/proc.c index 250e9f35137..7980abed464 100644 --- a/src/libs/zbxsysinfo/solaris/proc.c +++ b/src/libs/zbxsysinfo/solaris/proc.c @@ -55,8 +55,6 @@ zbx_sysinfo_proc_t; /****************************************************************************** * * - * Function: zbx_solaris_version_get * - * * * Purpose: get Solaris version at runtime * * * * Parameters: * @@ -93,8 +91,6 @@ static int zbx_solaris_version_get(unsigned int *major_version, unsigned int *mi /****************************************************************************** * * - * Function: zbx_detect_zone_support * - * * * Purpose: find if zones are supported * * * * Return value: * @@ -145,8 +141,6 @@ static void zbx_sysinfo_proc_clear(zbx_sysinfo_proc_t *proc) /****************************************************************************** * * - * Function: zbx_sysinfo_proc_free * - * * * Purpose: frees process data structure * * * ******************************************************************************/ @@ -211,8 +205,6 @@ static int get_cmdline(FILE *f_cmd, char **line, size_t *line_offset) /****************************************************************************** * * - * Function: proc_get_process_info * - * * * Purpose: get single process information * * * * Parameters: pid - [IN] the process pid * @@ -302,8 +294,6 @@ static int proc_get_process_info(const char *pid, unsigned int flags, zbx_sysinf /****************************************************************************** * * - * Function: proc_match_name * - * * * Purpose: checks if the process name matches filter * * * ******************************************************************************/ @@ -323,8 +313,6 @@ static int proc_match_name(const zbx_sysinfo_proc_t *proc, const char *procname) /****************************************************************************** * * - * Function: proc_match_user * - * * * Purpose: checks if the process user matches filter * * * ******************************************************************************/ @@ -341,8 +329,6 @@ static int proc_match_user(const zbx_sysinfo_proc_t *proc, const struct passwd * /****************************************************************************** * * - * Function: proc_match_cmdline * - * * * Purpose: checks if the process command line matches filter * * * ******************************************************************************/ @@ -360,8 +346,6 @@ static int proc_match_cmdline(const zbx_sysinfo_proc_t *proc, const char *cmdlin #ifdef HAVE_ZONE_H /****************************************************************************** * * - * Function: proc_match_zone * - * * * Purpose: checks if the process zone matches filter * * * ******************************************************************************/ @@ -379,8 +363,6 @@ static int proc_match_zone(const zbx_sysinfo_proc_t *proc, zbx_uint64_t flags, z /****************************************************************************** * * - * Function: proc_match_props * - * * * Purpose: checks if the process properties (except zone) matches filter * * * ******************************************************************************/ @@ -706,8 +688,6 @@ out: /****************************************************************************** * * - * Function: proc_read_cpu_util * - * * * Purpose: reads process cpu utilization values from /proc/[pid]/usage file * * * * Parameters: procutil - [IN/OUT] the process cpu utilization data * @@ -771,8 +751,6 @@ static int proc_read_cpu_util(zbx_procstat_util_t *procutil) /****************************************************************************** * * - * Function: zbx_proc_get_process_stats * - * * * Purpose: get process cpu utilization data * * * * Parameters: procs - [IN/OUT] an array of process utilization data * @@ -793,8 +771,6 @@ void zbx_proc_get_process_stats(zbx_procstat_util_t *procs, int procs_num) /****************************************************************************** * * - * Function: zbx_proc_get_processes * - * * * Purpose: get system processes * * * * Parameters: processes - [OUT] the system processes * @@ -844,8 +820,6 @@ out: /****************************************************************************** * * - * Function: zbx_proc_free_processes * - * * * Purpose: frees process vector read by zbx_proc_get_processes function * * * * Parameters: processes - [IN/OUT] the process vector to free * @@ -858,8 +832,6 @@ void zbx_proc_free_processes(zbx_vector_ptr_t *processes) /****************************************************************************** * * - * Function: zbx_proc_get_matching_pids * - * * * Purpose: get pids matching the specified process name, user name and * * command line * * * diff --git a/src/libs/zbxsysinfo/solaris/swap.c b/src/libs/zbxsysinfo/solaris/swap.c index 8d88853f327..54def653b64 100644 --- a/src/libs/zbxsysinfo/solaris/swap.c +++ b/src/libs/zbxsysinfo/solaris/swap.c @@ -23,8 +23,6 @@ /****************************************************************************** * * - * Function: get_swapinfo * - * * * Purpose: get swap usage statistics * * * * Return value: SUCCEED if swap usage statistics retrieved successfully * diff --git a/src/libs/zbxsysinfo/sysinfo.c b/src/libs/zbxsysinfo/sysinfo.c index 7dfa81c2464..fd7cc45b94b 100644 --- a/src/libs/zbxsysinfo/sysinfo.c +++ b/src/libs/zbxsysinfo/sysinfo.c @@ -76,8 +76,6 @@ static int parse_key_access_rule(char *pattern, zbx_key_access_rule_t *rule); /****************************************************************************** * * - * Function: parse_command_dyn * - * * * Purpose: parses item key and splits it into command and parameters * * * * Return value: ZBX_COMMAND_ERROR - error * @@ -143,8 +141,6 @@ static int add_to_metrics(ZBX_METRIC **metrics, ZBX_METRIC *metric, char *error, /****************************************************************************** * * - * Function: add_metric * - * * * Purpose: registers a new item key into the system * * * ******************************************************************************/ @@ -155,8 +151,6 @@ int add_metric(ZBX_METRIC *metric, char *error, size_t max_error_len) /****************************************************************************** * * - * Function: add_metric_local * - * * * Purpose: registers a new item key as local into the system * * * ******************************************************************************/ @@ -374,8 +368,6 @@ void free_metrics(void) /****************************************************************************** * * - * Function: init_key_access_rules * - * * * Purpose: initializes key access rule list * * * ******************************************************************************/ @@ -386,8 +378,6 @@ void init_key_access_rules(void) /****************************************************************************** * * - * Function: zbx_key_access_rule_free * - * * * Purpose: frees key access rule and its resources * * * ******************************************************************************/ @@ -401,8 +391,6 @@ static void zbx_key_access_rule_free(zbx_key_access_rule_t *rule) /****************************************************************************** * * - * Function: zbx_key_access_rule_create * - * * * Purpose: creates key access rule * * * * Parameters: pattern - [IN] the rule pattern * @@ -430,8 +418,6 @@ static zbx_key_access_rule_t *zbx_key_access_rule_create(char *pattern, zbx_key_ /****************************************************************************** * * - * Function: finalize_key_access_rules_configuration * - * * * Purpose: validates key access rules configuration * * * ******************************************************************************/ @@ -527,8 +513,6 @@ void finalize_key_access_rules_configuration(void) /****************************************************************************** * * - * Function: parse_key_access_rule * - * * * Purpose: parses key access rule expression from AllowKey and DenyKey * * * * Parameters: pattern - [IN] key access rule wildcard * @@ -605,8 +589,6 @@ static int parse_key_access_rule(char *pattern, zbx_key_access_rule_t *rule) /****************************************************************************** * * - * Function: compare_key_access_rules * - * * * Purpose: Compares two zbx_key_access_rule_t values to perform search * * within vector. Rule type (allow/deny) is not checked here. * * * @@ -639,8 +621,6 @@ static int compare_key_access_rules(const void *rule_a, const void *rule_b) /****************************************************************************** * * - * Function: add_key_access_rule * - * * * Purpose: adds new key access rule from AllowKey and DenyKey parameters * * * * Parameters: parameter - [IN] the parameter that defined the rule * @@ -682,8 +662,6 @@ int add_key_access_rule(const char *parameter, char *pattern, zbx_key_access_rul /****************************************************************************** * * - * Function: check_request_access_rules * - * * * Purpose: checks agent metric request against configured access rules * * * * Parameters: request - [IN] metric request (key and parameters) * @@ -768,8 +746,6 @@ int check_request_access_rules(AGENT_REQUEST *request) /****************************************************************************** * * - * Function: check_key_access_rules * - * * * Purpose: checks agent metric request against configured access rules * * * * Parameters: metric - [IN] metric requested (key and parameters) * @@ -797,8 +773,6 @@ int check_key_access_rules(const char *metric) /****************************************************************************** * * - * Function: free_key_access_rules * - * * * Purpose: cleanup key access rule list * * * ******************************************************************************/ @@ -850,8 +824,6 @@ void free_result(AGENT_RESULT *result) /****************************************************************************** * * - * Function: init_request * - * * * Purpose: initialize the request structure * * * * Parameters: request - pointer to the structure * @@ -869,8 +841,6 @@ void init_request(AGENT_REQUEST *request) /****************************************************************************** * * - * Function: free_request_params * - * * * Purpose: free memory used by the request parameters * * * * Parameters: request - pointer to the request structure * @@ -890,8 +860,6 @@ static void free_request_params(AGENT_REQUEST *request) /****************************************************************************** * * - * Function: free_request * - * * * Purpose: free memory used by the request * * * * Parameters: request - pointer to the request structure * @@ -905,8 +873,6 @@ void free_request(AGENT_REQUEST *request) /****************************************************************************** * * - * Function: add_request_param * - * * * Purpose: add a new parameter * * * * Parameters: request - [OUT] pointer to the request structure * @@ -926,8 +892,6 @@ static void add_request_param(AGENT_REQUEST *request, char *pvalue, zbx_request_ /****************************************************************************** * * - * Function: parse_item_key * - * * * Purpose: parse item command (key) and fill AGENT_REQUEST structure * * * * Parameters: itemkey - complete item key * @@ -1136,8 +1100,6 @@ static int replace_param(const char *cmd, const AGENT_REQUEST *request, char **o /****************************************************************************** * * - * Function: process * - * * * Purpose: execute agent check * * * * Parameters: in_command - item key * @@ -1502,8 +1464,6 @@ static zbx_log_t *get_result_log_value(AGENT_RESULT *result) /****************************************************************************** * * - * Function: get_result_value_by_type * - * * * Purpose: return value of result in special type * * if value missing, convert existing value to requested type * * * @@ -1552,8 +1512,6 @@ void *get_result_value_by_type(AGENT_RESULT *result, int require_type) /****************************************************************************** * * - * Function: unquote_key_param * - * * * Purpose: unquotes special symbols in item key parameter * * * * Parameters: param - [IN/OUT] item key parameter * @@ -1582,8 +1540,6 @@ void unquote_key_param(char *param) /****************************************************************************** * * - * Function: quote_key_param * - * * * Purpose: quotes special symbols in item key parameter * * * * Parameters: param - [IN/OUT] item key parameter * @@ -1662,8 +1618,6 @@ int zbx_execute_threaded_metric(zbx_metric_func_t metric_func, AGENT_REQUEST *re #else /****************************************************************************** * * - * Function: serialize_agent_result * - * * * Purpose: serialize agent result to transfer over pipe/socket * * * * Parameters: data - [IN/OUT] the data buffer * @@ -1749,8 +1703,6 @@ static void serialize_agent_result(char **data, size_t *data_alloc, size_t *data /****************************************************************************** * * - * Function: deserialize_agent_result * - * * * Purpose: deserialize agent result * * * * Parameters: data - [IN] the data to deserialize * @@ -1799,8 +1751,6 @@ static int deserialize_agent_result(char *data, AGENT_RESULT *result) /****************************************************************************** * * - * Function: zbx_execute_threaded_metric * - * * * Purpose: execute metric in a separate process/thread so it can be * * killed/terminated when timeout is detected * * * @@ -1974,8 +1924,6 @@ ZBX_THREAD_ENTRY(agent_metric_thread, data) /****************************************************************************** * * - * Function: zbx_execute_threaded_metric * - * * * Purpose: execute metric in a separate process/thread so it can be * * killed/terminated when timeout is detected * * * @@ -2085,8 +2033,6 @@ int zbx_execute_threaded_metric(zbx_metric_func_t metric_func, AGENT_REQUEST *re /****************************************************************************** * * - * Function: zbx_mpoints_free * - * * * Purpose: frees previously allocated mount-point structure * * * * Parameters: mpoint - [IN] pointer to structure from vector * diff --git a/src/libs/zbxsysinfo/win32/cpu.c b/src/libs/zbxsysinfo/win32/cpu.c index 7ffe1834d54..b4f9d55ab6a 100644 --- a/src/libs/zbxsysinfo/win32/cpu.c +++ b/src/libs/zbxsysinfo/win32/cpu.c @@ -32,8 +32,6 @@ static GETLPIEX get_lpiex; /****************************************************************************** * * - * Function: get_cpu_num_win32 * - * * * Purpose: find number of active logical CPUs * * * * Return value: number of CPUs or 0 on failure * @@ -127,8 +125,6 @@ finish: /****************************************************************************** * * - * Function: get_cpu_group_num_win32 * - * * * Purpose: returns the number of active processor groups * * * * Return value: number of groups, 1 if groups are not supported * @@ -167,8 +163,6 @@ int get_cpu_group_num_win32(void) /****************************************************************************** * * - * Function: get_numa_node_count_win32 * - * * * Purpose: returns the number of NUMA nodes * * * * Return value: number of NUMA nodes, 1 if NUMA not supported * diff --git a/src/libs/zbxsysinfo/win32/net.c b/src/libs/zbxsysinfo/win32/net.c index 9da8d2fc589..b9fdb6d4bbf 100644 --- a/src/libs/zbxsysinfo/win32/net.c +++ b/src/libs/zbxsysinfo/win32/net.c @@ -46,8 +46,6 @@ zbx_ifrow_t; /****************************************************************************** * * - * Function: zbx_ifrow_init * - * * * Purpose: initialize the zbx_ifrow_t variable * * * * Parameters: * @@ -93,8 +91,6 @@ static void zbx_ifrow_init(zbx_ifrow_t *pIfRow) /****************************************************************************** * * - * Function: zbx_ifrow_clean * - * * * Purpose: clean the zbx_ifrow_t variable * * * * Parameters: * @@ -111,8 +107,6 @@ static void zbx_ifrow_clean(zbx_ifrow_t *pIfRow) /****************************************************************************** * * - * Function: zbx_ifrow_call_get_if_entry * - * * * Purpose: call either GetIfEntry() or GetIfEntry2() based on the Windows * * release to fill the passed MIB interface structure. * * * @@ -264,8 +258,6 @@ static ULONG64 zbx_ifrow_get_out_discards(const zbx_ifrow_t *pIfRow) /****************************************************************************** * * - * Function: zbx_ifrow_get_utf8_description * - * * * Purpose: returns interface description encoded in UTF-8 format * * * * Parameters: * @@ -307,8 +299,6 @@ static char *zbx_ifrow_get_utf8_description(const zbx_ifrow_t *pIfRow) /****************************************************************************** * * - * Function: zbx_ifrow_get_guid_str * - * * * Purpose: returns interface GUID in string format * * * * Parameters: * diff --git a/src/libs/zbxsysinfo/win32/services.c b/src/libs/zbxsysinfo/win32/services.c index 808db5ab9a6..f6e910de653 100644 --- a/src/libs/zbxsysinfo/win32/services.c +++ b/src/libs/zbxsysinfo/win32/services.c @@ -39,8 +39,6 @@ zbx_startup_type_t; /****************************************************************************** * * - * Function: get_state_code * - * * * Purpose: convert service state code from value used in Microsoft Windows * * to value used in Zabbix * * * @@ -119,8 +117,6 @@ static void log_if_buffer_too_small(const char *function_name, DWORD sz) /****************************************************************************** * * - * Function: zbx_get_service_config * - * * * Purpose: wrapper function around QueryServiceConfig() * * * * Parameters: * @@ -146,8 +142,6 @@ static int zbx_get_service_config(SC_HANDLE hService, LPQUERY_SERVICE_CONFIG buf /****************************************************************************** * * - * Function: zbx_get_service_config2 * - * * * Purpose: wrapper function around QueryServiceConfig2() * * * * Parameters: * diff --git a/src/libs/zbxsysinfo/win32/system.c b/src/libs/zbxsysinfo/win32/system.c index 8a19ace9ad5..72fe68d4ace 100644 --- a/src/libs/zbxsysinfo/win32/system.c +++ b/src/libs/zbxsysinfo/win32/system.c @@ -26,8 +26,6 @@ /****************************************************************************** * * - * Function: read_registry_value * - * * * Purpose: read value from Windows registry * * * ******************************************************************************/ @@ -48,8 +46,6 @@ static wchar_t *read_registry_value(HKEY hKey, LPCTSTR name) /****************************************************************************** * * - * Function: zbx_win_getversion * - * * * Purpose: get Windows version information * * * ******************************************************************************/ diff --git a/src/libs/zbxtasks/task.c b/src/libs/zbxtasks/task.c index c96f4492da7..e4d9ca4f86a 100644 --- a/src/libs/zbxtasks/task.c +++ b/src/libs/zbxtasks/task.c @@ -28,8 +28,6 @@ /****************************************************************************** * * - * Function: tm_remote_command_clear * - * * * Purpose: frees remote command task resources * * * * Parameters: data - [IN] the remote command task data * @@ -46,8 +44,6 @@ static void tm_remote_command_clear(zbx_tm_remote_command_t *data) /****************************************************************************** * * - * Function: tm_remote_command_result_clear * - * * * Purpose: frees remote command result task resources * * * * Parameters: data - [IN] the remote command result task data * @@ -60,8 +56,6 @@ static void tm_remote_command_result_clear(zbx_tm_remote_command_result_t *data) /****************************************************************************** * * - * Function: tm_data_result_clear * - * * * Purpose: frees data result task resources * * * * Parameters: data - [IN] the data result task data * @@ -74,8 +68,6 @@ static void tm_data_result_clear(zbx_tm_data_result_t *data) /****************************************************************************** * * - * Function: tm_data_clear * - * * * Purpose: frees data task resources * * * * Parameters: data - [IN] the data task * @@ -88,8 +80,6 @@ static void tm_data_clear(zbx_tm_data_t *data) /****************************************************************************** * * - * Function: zbx_tm_task_clear * - * * * Purpose: frees task resources * * * * Parameters: task - [IN] * @@ -127,8 +117,6 @@ void zbx_tm_task_clear(zbx_tm_task_t *task) /****************************************************************************** * * - * Function: zbx_tm_task_free * - * * * Purpose: frees task and its resources * * * * Parameters: task - [IN] the task to free * @@ -142,8 +130,6 @@ void zbx_tm_task_free(zbx_tm_task_t *task) /****************************************************************************** * * - * Function: zbx_tm_remote_command_create * - * * * Purpose: create a remote command task data * * * * Parameters: command_type - [IN] the remote command type (ZBX_SCRIPT_TYPE_)* @@ -187,8 +173,6 @@ zbx_tm_remote_command_t *zbx_tm_remote_command_create(int command_type, const ch /****************************************************************************** * * - * Function: zbx_tm_remote_command_result_create * - * * * Purpose: create a remote command result task data * * * * Parameters: parent_taskid - [IN] the parent task identifier * @@ -213,8 +197,6 @@ zbx_tm_remote_command_result_t *zbx_tm_remote_command_result_create(zbx_uint64_t /****************************************************************************** * * - * Function: zbx_tm_check_now_create * - * * * Purpose: create a check now task data * * * * Parameters: itemid - [IN] the item identifier * @@ -234,8 +216,6 @@ zbx_tm_check_now_t *zbx_tm_check_now_create(zbx_uint64_t itemid) /****************************************************************************** * * - * Function: zbx_tm_data_create * - * * * Purpose: create a data task * * * * Parameters: parent_taskid - [IN] parent task identifier * @@ -262,8 +242,6 @@ zbx_tm_data_t *zbx_tm_data_create(zbx_uint64_t parent_taskid, const char *str, i /****************************************************************************** * * - * Function: zbx_tm_data_result_create * - * * * Purpose: create a data result task data * * * * Parameters: parent_taskid - [IN] the parent task identifier * @@ -287,8 +265,6 @@ zbx_tm_data_result_t *zbx_tm_data_result_create(zbx_uint64_t parent_taskid, int /****************************************************************************** * * - * Function: zbx_tm_task_create * - * * * Purpose: create a new task * * * * Parameters: taskid - [IN] the task identifier * @@ -321,8 +297,6 @@ zbx_tm_task_t *zbx_tm_task_create(zbx_uint64_t taskid, unsigned char type, unsig /****************************************************************************** * * - * Function: tm_save_remote_command_tasks * - * * * Purpose: saves remote command task data in database * * * * Parameters: tasks - [IN] the tasks * @@ -367,8 +341,6 @@ static int tm_save_remote_command_tasks(zbx_tm_task_t **tasks, int tasks_num) /****************************************************************************** * * - * Function: tm_save_remote_command_result_tasks * - * * * Purpose: saves remote command result task data in database * * * * Parameters: tasks - [IN] the tasks * @@ -410,8 +382,6 @@ static int tm_save_remote_command_result_tasks(zbx_tm_task_t **tasks, int tasks_ /****************************************************************************** * * - * Function: tm_save_check_now_tasks * - * * * Purpose: saves remote command task data in database * * * * Parameters: tasks - [IN] the tasks * @@ -451,8 +421,6 @@ static int tm_save_check_now_tasks(zbx_tm_task_t **tasks, int tasks_num) /****************************************************************************** * * - * Function: tm_save_data_tasks * - * * * Purpose: saves data task in database * * * * Parameters: tasks - [IN] the tasks * @@ -493,8 +461,6 @@ static int tm_save_data_tasks(zbx_tm_task_t **tasks, int tasks_num) /****************************************************************************** * * - * Function: tm_save_data_result_tasks * - * * * Purpose: saves data task result in database * * * * Parameters: tasks - [IN] the tasks * @@ -535,8 +501,6 @@ static int tm_save_data_result_tasks(zbx_tm_task_t **tasks, int tasks_num) /****************************************************************************** * * - * Function: tm_save_tasks * - * * * Purpose: saves tasks into database * * * * Parameters: tasks - [IN] the tasks * @@ -624,8 +588,6 @@ static int tm_save_tasks(zbx_tm_task_t **tasks, int tasks_num) /****************************************************************************** * * - * Function: zbx_tm_save_tasks * - * * * Purpose: saves tasks and their data into database * * * * Parameters: tasks - [IN] the tasks * @@ -642,8 +604,6 @@ void zbx_tm_save_tasks(zbx_vector_ptr_t *tasks) /****************************************************************************** * * - * Function: zbx_tm_save_task * - * * * Purpose: saves task and its data into database * * * * Parameters: task - [IN] the task * @@ -667,8 +627,6 @@ int zbx_tm_save_task(zbx_tm_task_t *task) /****************************************************************************** * * - * Function: zbx_tm_update_task_status * - * * * Purpose: update status of the specified tasks in database * * * * Parameters: tasks - [IN] the tasks * @@ -706,8 +664,6 @@ void zbx_tm_update_task_status(zbx_vector_ptr_t *tasks, int status) /****************************************************************************** * * - * Function: tm_json_serialize_task * - * * * Purpose: serializes common task data in json format * * * * Parameters: json - [OUT] the json data * @@ -723,8 +679,6 @@ static void tm_json_serialize_task(struct zbx_json *json, const zbx_tm_task_t *t /****************************************************************************** * * - * Function: tm_json_serialize_remote_command * - * * * Purpose: serializes remote command data in json format * * * * Parameters: json - [OUT] the json data * @@ -749,8 +703,6 @@ static void tm_json_serialize_remote_command(struct zbx_json *json, const zbx_tm /****************************************************************************** * * - * Function: tm_json_serialize_remote_command_result * - * * * Purpose: serializes remote command result data in json format * * * * Parameters: json - [OUT] the json data * @@ -767,8 +719,6 @@ static void tm_json_serialize_remote_command_result(struct zbx_json *json, /****************************************************************************** * * - * Function: tm_json_serialize_check_now * - * * * Purpose: serializes check now data in json format * * * * Parameters: json - [OUT] the json data * @@ -782,8 +732,6 @@ static void tm_json_serialize_check_now(struct zbx_json *json, const zbx_tm_chec /****************************************************************************** * * - * Function: tm_json_serialize_data * - * * * Purpose: serializes data task in json format * * * * Parameters: json - [OUT] the json data * @@ -799,8 +747,6 @@ static void tm_json_serialize_data(struct zbx_json *json, const zbx_tm_data_t *d /****************************************************************************** * * - * Function: tm_json_serialize_data_result * - * * * Purpose: serializes data task result in json format * * * * Parameters: json - [OUT] the json data * @@ -816,8 +762,6 @@ static void tm_json_serialize_data_result(struct zbx_json *json, const zbx_tm_da /****************************************************************************** * * - * Function: zbx_tm_json_serialize_tasks * - * * * Purpose: serializes remote command data in json format * * * * Parameters: json - [OUT] the json data * @@ -867,8 +811,6 @@ void zbx_tm_json_serialize_tasks(struct zbx_json *json, const zbx_vector_ptr_t * /****************************************************************************** * * - * Function: tm_json_deserialize_remote_command * - * * * Purpose: deserializes remote command from json data * * * * Parameters: jp - [IN] the json data * @@ -955,8 +897,6 @@ out: /****************************************************************************** * * - * Function: tm_json_deserialize_remote_command_result * - * * * Purpose: deserializes remote command result from json data * * * * Parameters: jp - [IN] the json data * @@ -997,8 +937,6 @@ out: /****************************************************************************** * * - * Function: tm_json_deserialize_check_now * - * * * Purpose: deserializes check now from json data * * * * Parameters: jp - [IN] the json data * @@ -1023,8 +961,6 @@ static zbx_tm_check_now_t *tm_json_deserialize_check_now(const struct zbx_json_p /****************************************************************************** * * - * Function: tm_json_deserialize_data * - * * * Purpose: deserializes data task from json * * * * Parameters: jp - [IN] the json * @@ -1065,8 +1001,6 @@ out: /****************************************************************************** * * - * Function: tm_json_deserialize_data_result * - * * * Purpose: deserializes data task result from json * * * * Parameters: jp - [IN] the json * @@ -1107,8 +1041,6 @@ out: /****************************************************************************** * * - * Function: tm_json_deserialize_task * - * * * Purpose: deserializes common task data from json data * * * * Parameters: jp - [IN] the json data * @@ -1141,8 +1073,6 @@ static zbx_tm_task_t *tm_json_deserialize_task(const struct zbx_json_parse *jp) /****************************************************************************** * * - * Function: zbx_tm_json_deserialize_tasks * - * * * Purpose: deserializes tasks from json data * * * * Parameters: jp - [IN] the json data * @@ -1207,8 +1137,6 @@ void zbx_tm_json_deserialize_tasks(const struct zbx_json_parse *jp, zbx_vector_p /****************************************************************************** * * - * Function: zbx_create_task_data * - * * * Purpose: insert task and its data in database * * * * Parameters: data - [IN] task data * @@ -1243,8 +1171,6 @@ static zbx_uint64_t zbx_create_task_data(const char *data, int len, zbx_uint64_t /****************************************************************************** * * - * Function: zbx_tm_task_result_wait * - * * * Purpose: wait for task result * * * * Parameters: taskid - [IN] task identifier * @@ -1288,8 +1214,6 @@ static int zbx_tm_task_result_wait(zbx_uint64_t taskid, char **info) /****************************************************************************** * * - * Function: zbx_tm_execute_task_data * - * * * Purpose: wait for task result * * * * Parameters: data - [IN] task data * diff --git a/src/libs/zbxtrends/baseline.c b/src/libs/zbxtrends/baseline.c index 351a6351a49..8877bf1e95a 100644 --- a/src/libs/zbxtrends/baseline.c +++ b/src/libs/zbxtrends/baseline.c @@ -23,8 +23,6 @@ /****************************************************************************** * * - * Function: baseline_get_common_data * - * * * Purpose: get baseline data for common period/season combinations * * * * Parameters: itemid - [IN] the item identifier * @@ -97,8 +95,6 @@ static int baseline_get_common_data(zbx_uint64_t itemid, const char *table, time /****************************************************************************** * * - * Function: baseline_get_isoyear_data * - * * * Purpose: get baseline data for week based periods in a year * * * * Parameters: itemid - [IN] the item identifier * @@ -186,8 +182,6 @@ static int baseline_get_isoyear_data(zbx_uint64_t itemid, const char *table, tim /****************************************************************************** * * - * Function: zbx_baseline_get_data * - * * * Purpose: get baseline data for the specified period * * * * Parameters: itemid - [IN] the item identifier * diff --git a/src/libs/zbxtrends/cache.c b/src/libs/zbxtrends/cache.c index c86040fc6c5..7ff5620f19f 100644 --- a/src/libs/zbxtrends/cache.c +++ b/src/libs/zbxtrends/cache.c @@ -141,8 +141,6 @@ static int tfc_compare_func(const void *v1, const void *v2) /****************************************************************************** * * - * Function: tfc_malloc_func * - * * * Purpose: allocate memory for indexing hashset * * * * Comments: There are two kinds of allocations that should be done: * @@ -182,8 +180,6 @@ static void tfc_free_func(void *ptr) /****************************************************************************** * * - * Function: tfc_lru_append * - * * * Purpose: append data to the tail of least recently used slot list * * * ******************************************************************************/ @@ -206,8 +202,6 @@ static void tfc_lru_append(zbx_tfc_data_t *data) /****************************************************************************** * * - * Function: tfc_lru_remove * - * * * Purpose: remove data from least recently used slot list * * * ******************************************************************************/ @@ -226,8 +220,6 @@ static void tfc_lru_remove(zbx_tfc_data_t *data) /****************************************************************************** * * - * Function: tfc_value_append * - * * * Purpose: append data to the tail of same item value list * * * ******************************************************************************/ @@ -249,8 +241,6 @@ static void tfc_value_append(zbx_tfc_data_t *root, zbx_tfc_data_t *data) /****************************************************************************** * * - * Function: tfc_value_remove * - * * * Purpose: remove data from same item value list * * * ******************************************************************************/ @@ -262,8 +252,6 @@ static void tfc_value_remove(zbx_tfc_data_t *data) /****************************************************************************** * * - * Function: tfc_free_data * - * * * Purpose: frees slot used to store trends function data * * * ******************************************************************************/ @@ -283,8 +271,6 @@ static void tfc_free_data(zbx_tfc_data_t *data) /****************************************************************************** * * - * Function: tfc_reserve_slot * - * * * Purpose: ensure there is a free slot available * * * ******************************************************************************/ @@ -304,8 +290,6 @@ static void tfc_reserve_slot(void) /****************************************************************************** * * - * Function: tfc_index_add * - * * * Purpose: indexes data by adding it to the index hashset * * * ******************************************************************************/ @@ -331,8 +315,6 @@ static zbx_tfc_data_t *tfc_index_add(zbx_tfc_data_t *data_local) /****************************************************************************** * * - * Function: tfc_function_str * - * * * Purpose: return trend function name in readable format * * * ******************************************************************************/ @@ -359,8 +341,6 @@ static const char *tfc_function_str(zbx_trend_function_t function) /****************************************************************************** * * - * Function: tfc_state_str * - * * * Purpose: return trend cache state in readable format * * * ******************************************************************************/ @@ -381,8 +361,6 @@ static const char *tfc_state_str(zbx_trend_state_t state) /****************************************************************************** * * - * Function: zbx_tfc_init * - * * * Purpose: initialize trend function cache * * * * Parameters: error - [OUT] the error message * @@ -451,8 +429,6 @@ out: /****************************************************************************** * * - * Function: zbx_tfc_destroy * - * * * Purpose: destroy trend function cache * * * ******************************************************************************/ @@ -469,8 +445,6 @@ void zbx_tfc_destroy(void) /****************************************************************************** * * - * Function: zbx_tfc_get_value * - * * * Purpose: get value and state from trend function cache * * * * Parameters: itemid - [IN] the itemid * @@ -548,8 +522,6 @@ int zbx_tfc_get_value(zbx_uint64_t itemid, int start, int end, zbx_trend_functio /****************************************************************************** * * - * Function: zbx_tfc_put_value * - * * * Purpose: put value and state from trend function cache * * * * Parameters: itemid - [IN] the itemid * diff --git a/src/libs/zbxtrends/trends.c b/src/libs/zbxtrends/trends.c index 44d6f1c2b82..e61dd0c5245 100644 --- a/src/libs/zbxtrends/trends.c +++ b/src/libs/zbxtrends/trends.c @@ -32,8 +32,6 @@ static char *trends_errors[ZBX_TREND_STATE_COUNT] = { /****************************************************************************** * * - * Function: trends_parse_base * - * * * Purpose: parse largest period base from function parameters * * * * Parameters: shift - [IN] the period shift parameter * @@ -76,8 +74,6 @@ static int trends_parse_base(const char *period_shift, zbx_time_unit_t *base, ch /****************************************************************************** * * - * Function: zbx_trends_parse_base * - * * * Purpose: parse largest period base from function parameters * * * * Parameters: params - [IN] the function parameters * @@ -103,8 +99,6 @@ int zbx_trends_parse_base(const char *params, zbx_time_unit_t *base, char **erro /****************************************************************************** * * - * Function: trends_parse_timeshift * - * * * Purpose: parse timeshift * * * * Parameters: from - [IN] the start time * @@ -198,8 +192,6 @@ static int trends_parse_timeshift(time_t from, const char *timeshift, zbx_time_u /****************************************************************************** * * - * Function: zbx_parse_timeshift * - * * * Purpose: parse timeshift * * * * Parameters: from - [IN] the start time * @@ -218,8 +210,6 @@ int zbx_parse_timeshift(time_t from, const char *timeshift, struct tm *tm, char /****************************************************************************** * * - * Function: zbx_trends_parse_range * - * * * Purpose: parse trend function period arguments into time range * * * * Parameters: from - [IN] the time the period shift is calculated * @@ -311,8 +301,6 @@ int zbx_trends_parse_range(time_t from, const char *param, int *start, int *end, /****************************************************************************** * * - * Function: zbx_trends_parse_nextcheck * - * * * Purpose: calculate possible nextcheck based on trend function parameters * * * * Parameters: from - [IN] the time the period shift is calculated * @@ -414,8 +402,6 @@ int zbx_trends_parse_nextcheck(time_t from, const char *period_shift, time_t *ne /****************************************************************************** * * - * Function: trends_eval * - * * * Purpose: evaluate expression with trends data * * * * Parameters: table - [IN] the trends table name * @@ -478,8 +464,6 @@ static zbx_trend_state_t trends_eval(const char *table, zbx_uint64_t itemid, int /****************************************************************************** * * - * Function: trends_eval_avg * - * * * Purpose: evaluate avg function with trends data * * * * Parameters: table - [IN] the trends table name * @@ -539,8 +523,6 @@ static zbx_trend_state_t trends_eval_avg(const char *table, zbx_uint64_t itemid, /****************************************************************************** * * - * Function: trends_eval_sum * - * * * Purpose: evaluate sum function with trends data * * * * Parameters: table - [IN] the trends table name * diff --git a/src/libs/zbxwin32/disk.c b/src/libs/zbxwin32/disk.c index cc2f9dadcd1..e54c8c309fd 100644 --- a/src/libs/zbxwin32/disk.c +++ b/src/libs/zbxwin32/disk.c @@ -22,8 +22,6 @@ /****************************************************************************** * * - * Function: get_cluster_size * - * * * Purpose: get file system cluster size for specified path (for cases when * * the file system is mounted on empty NTFS directory) * * * diff --git a/src/libs/zbxwin32/perfmon.c b/src/libs/zbxwin32/perfmon.c index 40846e0438e..3acba359173 100644 --- a/src/libs/zbxwin32/perfmon.c +++ b/src/libs/zbxwin32/perfmon.c @@ -290,8 +290,6 @@ close_query: /****************************************************************************** * * - * Function: get_builtin_object_index * - * * * Purpose: get performance object index by reference value described by * * zbx_builtin_counter_ref_t enum * * * @@ -308,8 +306,6 @@ DWORD get_builtin_object_index(zbx_builtin_counter_ref_t counter_ref) /****************************************************************************** * * - * Function: get_builtin_counter_index * - * * * Purpose: get performance counter index by reference value described by * * zbx_builtin_counter_ref_t enum * * * @@ -326,8 +322,6 @@ DWORD get_builtin_counter_index(zbx_builtin_counter_ref_t counter_ref) /****************************************************************************** * * - * Function: get_all_counter_names * - * * * Purpose: function to read counter names/help from registry * * * * Parameters: reg_key - [IN] registry key * @@ -378,8 +372,6 @@ finish: /****************************************************************************** * * - * Function: get_perf_name_by_index * - * * * Purpose: fills performance counter name based on its index * * * * Parameters: index - [IN] PDH counter index * @@ -407,8 +399,6 @@ static int get_perf_name_by_index(DWORD index, wchar_t *name, DWORD size) /****************************************************************************** * * - * Function: validate_counter_path * - * * * Purpose: checks if a specified counter path data is pointing to a valid * * counter * * * @@ -461,8 +451,6 @@ static int validate_counter_path(PDH_COUNTER_PATH_ELEMENTS *cpe) /****************************************************************************** * * - * Function: validate_object_counter * - * * * Purpose: checks if specified counter is valid successor of the object * * * * Parameters: object - [IN] PDH object index * @@ -509,8 +497,6 @@ out: /****************************************************************************** * * - * Function: init_builtin_counter_indexes * - * * * Purpose: Scans registry key with all performance counter English names * * and obtains system-dependent PDH counter indexes for further * * use by corresponding items. * @@ -619,8 +605,6 @@ out: /****************************************************************************** * * - * Function: get_counter_name * - * * * Purpose: get performance object or counter name by PDH index * * * * Parameters: pdhIndex - [IN] built-in performance counter index * diff --git a/src/libs/zbxxml/xml.c b/src/libs/zbxxml/xml.c index ca9738ea435..2715f035290 100644 --- a/src/libs/zbxxml/xml.c +++ b/src/libs/zbxxml/xml.c @@ -51,8 +51,6 @@ ZBX_PTR_VECTOR_IMPL(xml_node_ptr, zbx_xml_node_t *) /****************************************************************************** * * - * Function: xml_escape_dyn * - * * * Purpose: replace <> symbols in string with <> so the resulting * * string can be written into xml field * * * @@ -146,8 +144,6 @@ char *xml_escape_dyn(const char *data) /********************************************************************************** * * - * Function: xml_escape_xpath_stringsize * - * * * Purpose: calculate a string size after symbols escaping * * * * Parameters: string - [IN] the string to check * @@ -171,8 +167,6 @@ static size_t xml_escape_xpath_stringsize(const char *string) /********************************************************************************** * * - * Function: xml_escape_xpath_string * - * * * Purpose: replace " symbol in string with "" * * * * Parameters: string - [IN] the xpath string to escape * @@ -194,8 +188,6 @@ static void xml_escape_xpath_string(char *p, const char *string) /********************************************************************************** * * - * Function: xml_escape_xpath * - * * * Purpose: escaping of symbols for using in xpath expression * * * * Parameters: data - [IN/OUT] the string to update * @@ -218,8 +210,6 @@ void xml_escape_xpath(char **data) /****************************************************************************** * * - * Function: zbx_query_xpath * - * * * Purpose: execute xpath query * * * * Parameters: value - [IN/OUT] the value to process * @@ -329,8 +319,6 @@ out: #ifdef HAVE_LIBXML2 /****************************************************************************** * * - * Function: compare_xml_nodes_by_name * - * * * Purpose: compare two xml nodes by name * * * * Comments: This function is used to sort xml nodes by name * @@ -357,8 +345,6 @@ static void zbx_xml_node_free(zbx_xml_node_t *node) /****************************************************************************** * * - * Function: xml_to_vector * - * * * Purpose: to collect content of XML document nodes into vector * * * * Parameters: xml_node - [IN] parent XML node structure * @@ -471,8 +457,6 @@ static void xml_to_vector(xmlNode *xml_node, zbx_vector_xml_node_ptr_t *nodes) /****************************************************************************** * * - * Function: is_data * - * * * Purpose: to check if node is leaf node with text content * * * * Parameters: node - [IN] node structure * @@ -494,8 +478,6 @@ static int is_data(zbx_xml_node_t *node) /****************************************************************************** * * - * Function: vector_to_json * - * * * Purpose: to write content of vector into JSON document * * * * Parameters: nodes - [IN] vector of nodes * @@ -586,8 +568,6 @@ static void vector_to_json(zbx_vector_xml_node_ptr_t *nodes, struct zbx_json *js #ifdef HAVE_LIBXML2 /****************************************************************************** * * - * Function: zbx_open_xml * - * * * Purpose: to create xmlDoc and it's root node for input data * * * * Parameters: data - [IN] input data * @@ -647,8 +627,6 @@ int zbx_open_xml(char *data, int options, int maxerrlen, void **xml_doc, void ** /****************************************************************************** * * - * Function: zbx_check_xml_memory * - * * * Purpose: to check xml memory to be valid * * * * Parameters: mem - [IN] pointer to memory * @@ -685,8 +663,6 @@ int zbx_check_xml_memory(char *mem, int maxerrlen, char **errmsg) /****************************************************************************** * * - * Function: zbx_xml_to_json * - * * * Purpose: convert XML format value to JSON format * * * * Parameters: xml_data - [IN] the XML data to process * @@ -728,8 +704,6 @@ exit: /****************************************************************************** * * - * Function: zbx_xmlnode_to_json * - * * * Purpose: convert XML format value to JSON format * * * * Parameters: xml_node - [IN] the XML data to process * @@ -769,8 +743,6 @@ int zbx_xmlnode_to_json(void *xml_node, char **jstr) #ifdef HAVE_LIBXML2 /****************************************************************************** * * - * Function: json_to_xmlnode * - * * * Purpose: to write content of JSON document into XML node * * * * Parameters: jp - [IN] JSON parse structure * @@ -900,8 +872,6 @@ static void json_to_xmlnode(struct zbx_json_parse *jp, char *arr_name, int deep, /****************************************************************************** * * - * Function: zbx_json_to_xml * - * * * Purpose: convert JSON format value to XML format * * * * Parameters: json_data - [IN] the JSON data to process * |