proc-stat : change log priority 95/65895/1
authorKichan Kwon <k_c.kwon@samsung.com>
Thu, 14 Apr 2016 01:28:28 +0000 (10:28 +0900)
committerKichan Kwon <k_c.kwon@samsung.com>
Thu, 14 Apr 2016 01:28:28 +0000 (10:28 +0900)
- If resourced can't find pkgname in the program list, add new one
- Therefore, we don't have to worry about that if making new list is successful

Change-Id: I2360186e07fd408ae0cfbd4b12ebc465cc8b7353
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
src/proc-stat/proc-main.c

index 219bb7e..077a2ef 100644 (file)
@@ -232,17 +232,19 @@ struct proc_program_info *proc_add_program_list(const int type,
 
        ppi = find_program_info(pkgname);
        if (!ppi) {
-               _E("not found ppi : %s", pkgname);
+               _D("Can't find %s in the program list. Start to add it", pkgname);
                ppi = calloc(sizeof(struct proc_program_info), 1);
-               if (!ppi)
+               if (!ppi) {
+                       _E("Fail to add %s : not enough memory", pkgname);
                        return NULL;
+               }
 
                if (pai->ai)
                        ppi->pkgname = pai->ai->pkgname;
                else {
                        ppi->pkgname = strndup(pkgname, strlen(pkgname)+1);
                        if (!ppi->pkgname) {
-                               _E("not enough memory");
+                               _E("Fail to add %s : not enough memory", pkgname);
                                free(ppi);
                                return NULL;
                        }