diff options
| author | Karel Klic <kklic@redhat.com> | 2011-05-12 10:43:57 +0200 |
|---|---|---|
| committer | Karel Klic <kklic@redhat.com> | 2011-05-12 10:43:57 +0200 |
| commit | 5f42aa585aa9307872c74cf1bae5a852e3a75005 (patch) | |
| tree | 7b4b8b1f2951db833e5315c8d448f5a12a3cec7f /src/lib | |
| parent | dc8318402cf793c4bce1a1a5e39c60a2d3bc917e (diff) | |
| parent | 5f05e82e179275da7b0c29fbba4ab42e32035a9d (diff) | |
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/abrt_curl.c | 2 | ||||
| -rw-r--r-- | src/lib/event_config.c | 1 | ||||
| -rw-r--r-- | src/lib/event_xml_parser.c | 24 | ||||
| -rw-r--r-- | src/lib/hooklib.c | 2 | ||||
| -rw-r--r-- | src/lib/hooklib.h | 2 | ||||
| -rw-r--r-- | src/lib/read_write.c | 2 |
6 files changed, 21 insertions, 12 deletions
diff --git a/src/lib/abrt_curl.c b/src/lib/abrt_curl.c index 1cb9391d..c33b2b35 100644 --- a/src/lib/abrt_curl.c +++ b/src/lib/abrt_curl.c @@ -246,7 +246,7 @@ abrt_post(abrt_post_state_t *state, if (basename) basename++; else basename = data; #if 0 - // Simple way, without custom reader function + // Simple way, without custom reader function CURLFORMcode curlform_err = curl_formadd(&post, &last, CURLFORM_PTRNAME, "file", // element name CURLFORM_FILE, data, // filename to read from diff --git a/src/lib/event_config.c b/src/lib/event_config.c index 66f9beba..9f48af54 100644 --- a/src/lib/event_config.c +++ b/src/lib/event_config.c @@ -55,6 +55,7 @@ void free_event_config(event_config_t *p) //free(p->action); free(p->description); free(p->long_descr); + free(p->creates_elements); for (opt = p->options; opt; opt = opt->next) free_event_option(opt->data); g_list_free(p->options); diff --git a/src/lib/event_xml_parser.c b/src/lib/event_xml_parser.c index 17e8a72e..5bf5f411 100644 --- a/src/lib/event_xml_parser.c +++ b/src/lib/event_xml_parser.c @@ -25,6 +25,7 @@ #define LONG_DESCR_ELEMENT "long-description" #define ALLOW_EMPTY_ELEMENT "allow-empty" #define NOTE_HTML_ELEMENT "note-html" +#define CREATES_ELEMENT "creates-elements" #define OPTION_ELEMENT "option" //#define ACTION_ELEMENT "action" #define NAME_ELEMENT "name" @@ -55,16 +56,16 @@ static const char *const option_types[] = static char *get_element_lang(struct my_parse_data *parse_data, const gchar **att_names, const gchar **att_values) { char *short_locale_end = strchr(parse_data->cur_locale, '_'); - VERB2 log("locale: %s", parse_data->cur_locale); + VERB3 log("locale: %s", parse_data->cur_locale); int i; for (i = 0; att_names[i] != NULL; ++i) { - VERB2 log("attr: %s:%s", att_names[i], att_values[i]); + VERB3 log("attr: %s:%s", att_names[i], att_values[i]); if (strcmp(att_names[i], "xml:lang") == 0) { if (strcmp(att_values[i], parse_data->cur_locale) == 0) { - VERB2 log("found translation for: %s", parse_data->cur_locale); + VERB3 log("found translation for: %s", parse_data->cur_locale); return xstrdup(att_values[i]); } @@ -74,7 +75,7 @@ static char *get_element_lang(struct my_parse_data *parse_data, const gchar **at if (short_locale_end && strncmp(att_values[i], parse_data->cur_locale, short_locale_end - parse_data->cur_locale) == 0 ) { - VERB2 log("found translation for shortlocale: %s", parse_data->cur_locale); + VERB3 log("found translation for shortlocale: %s", parse_data->cur_locale); return xstrndup(att_values[i], short_locale_end - parse_data->cur_locale); } } @@ -297,11 +298,18 @@ static void text(GMarkupParseContext *context, if (strcmp(inner_element, ACTION_ELEMENT) == 0) { VERB2 log("action description:'%s'", text_copy); - free(ui->eo_action); - ui->eo_action = text_copy; + free(ui->action); + ui->action = text_copy; return; } */ + if (strcmp(inner_element, CREATES_ELEMENT) == 0) + { + VERB2 log("creates_elements:'%s'", text_copy); + free(ui->creates_elements); + ui->creates_elements = text_copy; + return; + } if (strcmp(inner_element, NAME_ELEMENT) == 0) { if (parse_data->attribute_lang != NULL) /* if it isn't for other locale */ @@ -321,7 +329,7 @@ static void text(GMarkupParseContext *context, } if (strcmp(inner_element, DESCRIPTION_ELEMENT) == 0) { - VERB2 log("event description:'%s'", text_copy); + VERB3 log("event description:'%s'", text_copy); if (parse_data->attribute_lang != NULL) /* if it isn't for other locale */ { @@ -339,7 +347,7 @@ static void text(GMarkupParseContext *context, } if (strcmp(inner_element, LONG_DESCR_ELEMENT) == 0) { - VERB2 log("event long description:'%s'", text_copy); + VERB3 log("event long description:'%s'", text_copy); if (parse_data->attribute_lang != NULL) /* if it isn't for other locale */ { diff --git a/src/lib/hooklib.c b/src/lib/hooklib.c index 3bde4dfa..804a2394 100644 --- a/src/lib/hooklib.c +++ b/src/lib/hooklib.c @@ -1,5 +1,5 @@ /* - Copyright (C) 2009 RedHat inc. + Copyright (C) 2009 RedHat inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/lib/hooklib.h b/src/lib/hooklib.h index c140f951..1add7d09 100644 --- a/src/lib/hooklib.h +++ b/src/lib/hooklib.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2009 RedHat inc. + Copyright (C) 2009 RedHat inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/lib/read_write.c b/src/lib/read_write.c index da067f78..fe85fcfb 100644 --- a/src/lib/read_write.c +++ b/src/lib/read_write.c @@ -88,7 +88,7 @@ ssize_t full_write(int fd, const void *buf, size_t len) /* user can do another write to know the error code */ return total; } - return cc; /* write() returns -1 on failure. */ + return cc; /* write() returns -1 on failure. */ } total += cc; |
