From 278acec0540a2f64b9955ff3050ec52f555b12e3 Mon Sep 17 00:00:00 2001 From: Sung-jae Park Date: Fri, 1 Feb 2013 05:57:15 +0000 Subject: [PATCH] Update the smack rule and debug mode. Change-Id: I37852fada0320297b9d2360cbca9523cdb8130b5 --- include/main.h | 2 ++ org.tizen.data-provider-slave.rule | 4 ++++ packaging/org.tizen.data-provider-slave.spec | 2 +- src/main.c | 9 ++++++++- src/so_handler.c | 4 ++++ 5 files changed, 19 insertions(+), 2 deletions(-) diff --git a/include/main.h b/include/main.h index 13019db..738b036 100644 --- a/include/main.h +++ b/include/main.h @@ -14,4 +14,6 @@ * limitations under the License. */ +extern int main_heap_monitor_is_enabled(void); + /* End of a file */ diff --git a/org.tizen.data-provider-slave.rule b/org.tizen.data-provider-slave.rule index 09f3d13..bafbd04 100644 --- a/org.tizen.data-provider-slave.rule +++ b/org.tizen.data-provider-slave.rule @@ -2,6 +2,9 @@ org.tizen.data-provider-slave system::app_logging w org.tizen.data-provider-slave system::vconf rwxat org.tizen.data-provider-slave system::homedir rwxat org.tizen.data-provider-slave system::use_internet rw +org.tizen.data-provider-slave system::media rwxat +org.tizen.data-provider-slave system::share rwxat +org.tizen.data-provider-slave pluseaudio rwxat org.tizen.data-provider-slave ail::db rw org.tizen.data-provider-slave app-svc::db rw org.tizen.data-provider-slave xorg w @@ -12,3 +15,4 @@ org.tizen.data-provider-slave data-provider-master::share rwx org.tizen.data-provider-slave data-provider-master::db rw org.tizen.data-provider-slave data-provider-master w org.tizen.data-provider-slave e17 rx +org.tizen.app-tray org.tizen.data-provider-slave rx diff --git a/packaging/org.tizen.data-provider-slave.spec b/packaging/org.tizen.data-provider-slave.spec index 77dc93c..2718d96 100644 --- a/packaging/org.tizen.data-provider-slave.spec +++ b/packaging/org.tizen.data-provider-slave.spec @@ -1,6 +1,6 @@ Name: org.tizen.data-provider-slave Summary: Plugin type livebox service provider. -Version: 0.9.7 +Version: 0.9.8 Release: 1 Group: frameowrk/livebox License: Flora License diff --git a/src/main.c b/src/main.c index e72430b..6e417f6 100644 --- a/src/main.c +++ b/src/main.c @@ -55,7 +55,7 @@ extern void evas_common_font_flush(void); extern int evas_common_font_cache_get(void); extern void evas_common_font_cache_set(int size); -#define TEXT_CLASS "slp" +#define TEXT_CLASS "tizen" #define TEXT_SIZE -100 static struct info { @@ -221,6 +221,7 @@ static void app_service(service_h service, void *data) ret = service_get_extra_data(service, "secured", &secured); if (ret != SERVICE_ERROR_NONE) { + free(name); ErrPrint("Secured is not valid\n"); return; } @@ -239,6 +240,7 @@ static void app_service(service_h service, void *data) DbgPrint("Name assigned: %s\n", name); DbgPrint("Secured: %s\n", secured); ret = client_init(name); + free(name); initialized = 1; return; @@ -307,4 +309,9 @@ int main(int argc, char *argv[]) return ret; } +HAPI int main_heap_monitor_is_enabled(void) +{ + return s_info.heap_monitor; +} + /* End of a file */ diff --git a/src/so_handler.c b/src/so_handler.c index 941f416..a47c38c 100644 --- a/src/so_handler.c +++ b/src/so_handler.c @@ -26,6 +26,7 @@ #include #include +#include "main.h" #include "critical_log.h" #include "debug.h" #include "so_handler.h" @@ -888,6 +889,9 @@ HAPI int so_get_output_info(struct instance *inst, int *w, int *h, double *prior } } + if (main_heap_monitor_is_enabled()) + DbgPrint("%s allocates %d bytes\n", item->pkgname, heap_monitor_target_usage(item->so_fname)); + return ret; } -- 2.7.4