return DLOG_ERROR_NOT_PERMITTED;
if (limiter) {
+ // LCOV_EXCL_START : disabled feature (limiter)
should_log = __log_limiter_pass_log(tag, prio);
if (!should_log) {
"Your log has been blocked due to limit of log lines per minute.");
return DLOG_ERROR_NOT_PERMITTED;
}
+ // LCOV_EXCL_STOP
}
return DLOG_ERROR_NONE;
}
}
+// LCOV_EXCL_START : system error
void __log_limiter_rules_purge(void)
{
rules_destroy(rules_table);
rules_table = NULL;
}
+// LCOV_EXCL_STOP
+// LCOV_EXCL_START : disabled feature (limiter)
static int rule_compare(struct rule* r1, struct rule* r2)
{
if (r1->hash == r2->hash) {
return (r1->hash > key ? 1 : (-1));
}
+// LCOV_EXCL_STOP
/* Translate fancy priority notation into common denominator */
static int util_prio_to_char(int prio)
return hash;
}
+// LCOV_EXCL_START : disabled feature (limiter)
/* Create hashmap, it's internal interface. */
static struct hashmap* hashmap_create(int size, hash_cmp_func_t cmp_func,
hash_match_func_t match_func)
return (-1);
}
+// LCOV_EXCL_STOP
void __log_limiter_destroy(void)
{
return 0;
}
+// LCOV_EXCL_START : disabled feature (limiter)
/* Function implement logic needed to decide,
whenever message is written to log or not.
/* If everything failed, then pass message through */
return 1;
}
+// LCOV_EXCL_STOP