Fix __get_name on appid without dot seperator 60/231560/2
authorDaehyeon Jung <darrenh.jung@samsung.com>
Wed, 22 Apr 2020 10:56:10 +0000 (19:56 +0900)
committerDaehyeon Jung <darrenh.jung@samsung.com>
Wed, 22 Apr 2020 10:58:28 +0000 (19:58 +0900)
Change-Id: I6bd4ca0c790a6494dbbde886e2f74a0835822db0
Signed-off-by: Daehyeon Jung <darrenh.jung@samsung.com>
src/base/appcore_base.c

index a4b4f73..b2d932b 100644 (file)
@@ -1004,8 +1004,10 @@ static int __get_app_name(const char *appid, char **name)
 
        /* com.vendor.name -> name */
        name_token = strrchr(appid, '.');
-       if (name_token == NULL)
-               return -1;
+       if (name_token == NULL) {
+               *name = strdup(appid);
+               return 0;
+       }
 
        name_token++;