From 1b058c29ef50b45e5249899159607a0eb3cf0096 Mon Sep 17 00:00:00 2001 From: Sung-jae Park Date: Fri, 15 Feb 2013 08:51:14 +0000 Subject: [PATCH] Update the conf file. Add the slave_waiting_time. But the slave doesn't need it. just for the master. Change-Id: I8def8f4aa32843b165f3ef672d75d2fb5557755d --- include/conf.h | 2 ++ packaging/org.tizen.data-provider-slave.spec | 2 +- src/conf.c | 12 ++++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/include/conf.h b/include/conf.h index ec05739..e8485c1 100644 --- a/include/conf.h +++ b/include/conf.h @@ -48,6 +48,7 @@ struct conf { char *replace_tag; double slave_ttl; + double slave_activate_time; int max_log_line; int max_log_file; @@ -126,6 +127,7 @@ extern int conf_loader(void); #define REPLACE_TAG_APPID g_conf.replace_tag #define SLAVE_TTL g_conf.slave_ttl +#define SLAVE_ACTIVATE_TIME g_conf.slave_activate_time #define MAX_LOG_LINE g_conf.max_log_line #define MAX_LOG_FILE g_conf.max_log_file diff --git a/packaging/org.tizen.data-provider-slave.spec b/packaging/org.tizen.data-provider-slave.spec index f270ea2..c0e538f 100644 --- a/packaging/org.tizen.data-provider-slave.spec +++ b/packaging/org.tizen.data-provider-slave.spec @@ -2,7 +2,7 @@ Name: org.tizen.data-provider-slave Summary: Plugin type livebox service provider. -Version: 0.9.14 +Version: 0.9.15 Release: 1 Group: frameowrk/livebox License: Flora License diff --git a/src/conf.c b/src/conf.c index b62784f..99850e0 100644 --- a/src/conf.c +++ b/src/conf.c @@ -55,6 +55,7 @@ HAPI struct conf g_conf = { .replace_tag = "/APPID/", .slave_ttl = 30.0f, + .slave_activate_time = 30.0f, .max_log_line = 1000, .max_log_file = 3, @@ -224,6 +225,13 @@ static void slave_ttl_handler(char *buffer) DbgPrint("Slave TTL: %s\n", g_conf.slave_ttl); } +static void slave_activate_time_handler(char *buffer) +{ + if (sscanf(buffer, "%lf", &g_conf.slave_activate_time) != 1) + ErrPrint("Failed to parse the slave_activate_time\n"); + DbgPrint("Slave activate time: %lf\n", g_conf.slave_activate_time); +} + static void max_log_line_handler(char *buffer) { if (sscanf(buffer, "%d", &g_conf.max_log_line) != 1) @@ -384,6 +392,10 @@ HAPI int conf_loader(void) .handler = slave_ttl_handler, }, { + .name = "slave_activate_time", + .handler = slave_activate_time_handler, + }, + { .name = "max_log_line", .handler = max_log_line_handler, }, -- 2.7.4