From fa8a5443ea4bd1739f0543399af3eb9e144f7086 Mon Sep 17 00:00:00 2001 From: Jaeho Lee Date: Wed, 13 Feb 2013 18:57:15 +0900 Subject: [PATCH] fixed a resolution bug Signed-off-by: Jaeho Lee --- packaging/app-svc.spec | 2 +- src/appsvc.c | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/packaging/app-svc.spec b/packaging/app-svc.spec index 974ed15..2eac6c7 100644 --- a/packaging/app-svc.spec +++ b/packaging/app-svc.spec @@ -1,6 +1,6 @@ Name: app-svc Summary: App svc -Version: 0.1.43 +Version: 0.1.44 Release: 1 Group: System/Libraries License: Apache License, Version 2.0 diff --git a/src/appsvc.c b/src/appsvc.c index b08a6c9..8282d45 100755 --- a/src/appsvc.c +++ b/src/appsvc.c @@ -499,17 +499,14 @@ static int __get_list_with_condition_mime_extened(char *op, char *uri, char *mim tmp = malloc(MAX_MIME_STR_SIZE); __get_list_with_condition(op, uri, mime, pkg_list); - if ((strncmp(mime, "NULL", 4) != 0) && (strncmp(s_type, "%", 1) != 0)) { snprintf(tmp, MAX_MIME_STR_SIZE-1, "%s/*", m_type); __get_list_with_condition(op, uri, tmp, pkg_list); } - if ((strncmp(mime, "NULL", 4) != 0) && (strncmp(m_type, "%", 1) != 0)) { snprintf(tmp, MAX_MIME_STR_SIZE-1, "*/*"); __get_list_with_condition(op, uri, tmp, pkg_list); } - free(tmp); return 0; @@ -518,7 +515,20 @@ static int __get_list_with_condition_mime_extened(char *op, char *uri, char *mim static int __get_list_with_condition_mime_extened_with_collation(char *op, char *uri, char *mime, char *m_type, char *s_type, GSList **pkg_list) { + char *tmp; + + tmp = malloc(MAX_MIME_STR_SIZE); + _svc_db_get_list_with_collation(op, uri, mime, pkg_list); + if ((strncmp(mime, "NULL", 4) != 0) && (strncmp(s_type, "%", 1) != 0)) { + snprintf(tmp, MAX_MIME_STR_SIZE-1, "%s/*", m_type); + _svc_db_get_list_with_collation(op, uri, tmp, pkg_list); + } + if ((strncmp(mime, "NULL", 4) != 0) && (strncmp(m_type, "%", 1) != 0)) { + snprintf(tmp, MAX_MIME_STR_SIZE-1, "*/*"); + _svc_db_get_list_with_collation(op, uri, tmp, pkg_list); + } + free(tmp); return 0; } -- 2.7.4