summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2011-03-09 17:48:48 +0100
committerJiri Moskovcak <jmoskovc@redhat.com>2011-03-09 17:48:48 +0100
commit14be10f0582478983c69d567b416621783768c2d (patch)
tree299e99c444dc1e51998642b6f3e1ddacb985c8a0 /src/lib
parentc2f2a9f310e7b3bc3725cc8dc7e805fd38c7fbbd (diff)
downloadabrt-14be10f0582478983c69d567b416621783768c2d.tar.gz
abrt-14be10f0582478983c69d567b416621783768c2d.tar.xz
abrt-14be10f0582478983c69d567b416621783768c2d.zip
remove some not needed fields from event_config
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/event_config.c17
-rw-r--r--src/lib/event_xml_parser.c10
2 files changed, 18 insertions, 9 deletions
diff --git a/src/lib/event_config.c b/src/lib/event_config.c
index a79ee40c..02df048f 100644
--- a/src/lib/event_config.c
+++ b/src/lib/event_config.c
@@ -19,8 +19,8 @@ void free_event_option(event_option_t *p)
free(p->name);
free(p->value);
free(p->label);
- free(p->description);
- free(p->allowed_value);
+ //free(p->description);
+ //free(p->allowed_value);
free(p);
}
@@ -28,9 +28,9 @@ void free_event_config(event_config_t *p)
{
if (!p)
return;
- free(p->name);
- free(p->title);
- free(p->action);
+ free(p->screen_name);
+ //free(p->title);
+ //free(p->action);
free(p->description);
for (GList *opt = p->options; opt; opt = opt->next)
free_event_option(opt->data);
@@ -39,6 +39,11 @@ void free_event_config(event_config_t *p)
}
+static int mystrcmp(gconstpointer a, gconstpointer b)
+{
+ return strcmp( ((event_option_t *)a)->name, (char *)b);
+}
+
// (Re)loads data from /etc/abrt/events/*.{conf,xml}
void load_event_config_data(void)
{
@@ -91,7 +96,7 @@ void load_event_config_data(void)
while (g_hash_table_iter_next(&iter, (void**)&name, (void**)&value))
{
event_option_t *opt;
- GList *elem = g_list_find(event_config->options, name);
+ GList *elem = g_list_find_custom(event_config->options, name, &mystrcmp);
if (elem)
{
opt = elem->data;
diff --git a/src/lib/event_xml_parser.c b/src/lib/event_xml_parser.c
index be4a9e09..c1f200ec 100644
--- a/src/lib/event_xml_parser.c
+++ b/src/lib/event_xml_parser.c
@@ -6,7 +6,7 @@
#define DESCRIPTION_ELEMENT "description"
#define ALLOW_EMPTY_ELEMENT "allow-empty"
#define OPTION_ELEMENT "option"
-#define ACTION_ELEMENT "action"
+//#define ACTION_ELEMENT "action"
#define NAME_ELEMENT "name"
static int in_option = 0; //FIXME
@@ -110,6 +110,7 @@ static void text(GMarkupParseContext *context,
option->label = _text;
return;
}
+ /*
if (strcmp(inner_element, DESCRIPTION_ELEMENT) == 0)
{
VERB2 log("tooltip:'%s'", _text);
@@ -117,10 +118,12 @@ static void text(GMarkupParseContext *context,
option->description = _text;
return;
}
+ */
}
else
{
/* we're not in option, so the description is for the event */
+ /*
if (strcmp(inner_element, ACTION_ELEMENT) == 0)
{
VERB2 log("action description:'%s'", _text);
@@ -128,11 +131,12 @@ static void text(GMarkupParseContext *context,
ui->action = _text;
return;
}
+ */
if (strcmp(inner_element, NAME_ELEMENT) == 0)
{
VERB2 log("event name:'%s'", _text);
- free(ui->name);
- ui->name = _text;
+ free(ui->screen_name);
+ ui->screen_name = _text;
return;
}
if (strcmp(inner_element, DESCRIPTION_ELEMENT) == 0)