--- src/lib/json.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/src/lib/json.c b/src/lib/json.c index cd30575..e0d5548 100644 --- a/src/lib/json.c +++ b/src/lib/json.c @@ -76,7 +76,13 @@ static void ureport_add_str(struct json_object *ur, const char *key,
static void ureport_add_os(struct json_object *ur, problem_data_t *pd) { - char *pd_item = problem_data_get_content_or_NULL(pd, FILENAME_OS_RELEASE); + char *pd_item = problem_data_get_content_or_NULL(pd, FILENAME_ROOTDIR); + if (pd_item) + pd_item = problem_data_get_content_or_NULL(pd, FILENAME_OS_RELEASE_IN_ROOTDIR); + + if (!pd_item) + pd_item = problem_data_get_content_or_NULL(pd, FILENAME_OS_RELEASE); + if (!pd_item) return;
It compiles, it works. Please, push it.
On Monday 24 of September 2012 12:54:59 Michal Toman wrote:
src/lib/json.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/src/lib/json.c b/src/lib/json.c index cd30575..e0d5548 100644 --- a/src/lib/json.c +++ b/src/lib/json.c @@ -76,7 +76,13 @@ static void ureport_add_str(struct json_object *ur, const char *key,
static void ureport_add_os(struct json_object *ur, problem_data_t *pd) {
- char *pd_item = problem_data_get_content_or_NULL(pd,
FILENAME_OS_RELEASE); + char *pd_item = problem_data_get_content_or_NULL(pd, FILENAME_ROOTDIR); + if (pd_item)
pd_item = problem_data_get_content_or_NULL(pd,
FILENAME_OS_RELEASE_IN_ROOTDIR); +
- if (!pd_item)
pd_item = problem_data_get_content_or_NULL(pd,
FILENAME_OS_RELEASE); + if (!pd_item) return;
crash-catcher@lists.fedorahosted.org