Update the conf file.
authorSung-jae Park <nicesj.park@samsung.com>
Fri, 15 Feb 2013 08:51:14 +0000 (08:51 +0000)
committerSung-jae Park <nicesj.park@samsung.com>
Fri, 15 Feb 2013 08:51:14 +0000 (08:51 +0000)
Add the slave_waiting_time.
But the slave doesn't need it. just for the master.

Change-Id: I8def8f4aa32843b165f3ef672d75d2fb5557755d

include/conf.h
packaging/org.tizen.data-provider-slave.spec
src/conf.c

index ec05739..e8485c1 100644 (file)
@@ -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
index f270ea2..c0e538f 100644 (file)
@@ -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
index b62784f..99850e0 100644 (file)
@@ -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,
                },