fixed a resolution bug
authorJaeho Lee <jaeho81.lee@samsung.com>
Wed, 13 Feb 2013 09:57:15 +0000 (18:57 +0900)
committerJaeho Lee <jaeho81.lee@samsung.com>
Wed, 13 Feb 2013 10:00:19 +0000 (19:00 +0900)
Signed-off-by: Jaeho Lee <jaeho81.lee@samsung.com>
packaging/app-svc.spec
src/appsvc.c

index 974ed15..2eac6c7 100644 (file)
@@ -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
index b08a6c9..8282d45 100755 (executable)
@@ -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;
 }