Denys Vlasenko dvlasenk@redhat.com writes:
On Thu, 2011-03-31 at 11:24 +0200, Nikola Pajkovsky wrote:
@@ -741,23 +740,17 @@ int report(const char *dump_dir_name, int flags)
/* Get possible reporters associated with this particular crash */ /* TODO: npajkovs: remove this annoying c++ vector_string_t */
- vector_string_t report_events;
- GList *report_events = NULL; if (report_events_as_lines && *report_events_as_lines)
report_events = str_to_glist(report_events_as_lines, '\n');
- free(report_events_as_lines);
- if (!report_events) {
char *events = report_events_as_lines;
while (*events)
{
char *end = strchrnul(events, '\n');
char *tmp = xstrndup(events, end - events);
report_events.push_back(tmp);
free(tmp);
events = end;
if (!*events)
break;
events++;
}
free_crash_data(crash_data);
error_msg_and_die(_("No reporters selected, program exiting..."));
This message is wrong. You reach this line only if events_as_lines is "", IOW: when there are no possible reporter events for this dump dir at all. I propose to change message to reflect the real situation. Maybe "The problem in '%s' has no defined reporters"?
I don't know what kind of string do you want to print. I mean '%s'? Maybe better string will be "The problem is that there are no defined reporters"?
The rest looks good to me.