Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check cache/feed errors. #358

Merged
merged 2 commits into from
Jul 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/pluginscheduler.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ plugins_scheduler_enable (plugins_scheduler_t sched, const char *oid_list,
char *oids, *oid, *saveptr;
GHashTable *oids_table, *names_table;
int ret = 0;
static int error_counter = 0;

oids_table = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, NULL);
names_table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
Expand All @@ -217,7 +218,14 @@ plugins_scheduler_enable (plugins_scheduler_t sched, const char *oid_list,
{
ret = plugin_add (sched, oids_table, names_table, autoload, oid);
if (ret)
goto error;
{
error_counter++;
if (error_counter >= 5)
{
g_message ("Stopped plugin scheduler: High number of errors.");
goto error;
}
}
oid = strtok_r (NULL, ";", &saveptr);
}

Expand Down