if (log_id <= LOG_ID_INVALID || LOG_ID_MAX <= log_id)
return DLOG_ERROR_INVALID_PARAMETER;
- if (dynamic_config) {
+ if (dynamic_config)
__dynamic_config_update();
- // LCOV_EXCL_START : disabled feature (limiter)
- if (limiter) {
- pthread_mutex_lock(&log_init_lock);
- int should_log = __log_limiter_pass_log(tag, prio);
- pthread_mutex_unlock(&log_init_lock);
-
- if (!should_log) {
- return DLOG_ERROR_NOT_PERMITTED;
- } else if (should_log < 0) {
- write_to_log(log_id, prio, tag,
- "Your log has been blocked due to limit of log lines per minute.");
- return DLOG_ERROR_NOT_PERMITTED;
- }
+ // LCOV_EXCL_START : disabled feature (limiter)
+ if (limiter) {
+ pthread_mutex_lock(&log_init_lock);
+ int should_log = __log_limiter_pass_log(tag, prio);
+ pthread_mutex_unlock(&log_init_lock);
+
+ if (!should_log) {
+ return DLOG_ERROR_NOT_PERMITTED;
+ } else if (should_log < 0) {
+ write_to_log(log_id, prio, tag,
+ "Your log has been blocked due to limit of log lines per minute.");
+ return DLOG_ERROR_NOT_PERMITTED;
}
- // LCOV_EXCL_STOP
}
+ // LCOV_EXCL_STOP
if (!plog[log_id])
return DLOG_ERROR_NOT_PERMITTED;