Code

Renamed the project to SysDB (System DataBase).
[sysdb.git] / src / daemon / config.c
index 0b7cc77bfd9a7a6a6bc8e1acd1f5f93f353389f4..aa5cb990b8612ff446c659c2cd9137d4a25df7ff 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * syscollector - src/daemon_config.c
+ * SysDB - src/daemon/config.c
  * Copyright (C) 2012 Sebastian 'tokkee' Harl <sh@tokkee.org>
  * All rights reserved.
  *
  * Copyright (C) 2012 Sebastian 'tokkee' Harl <sh@tokkee.org>
  * All rights reserved.
  *
@@ -25,7 +25,7 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "syscollector.h"
+#include "sysdb.h"
 #include "core/plugin.h"
 #include "utils/time.h"
 
 #include "core/plugin.h"
 #include "utils/time.h"
 
  * private variables
  */
 
  * private variables
  */
 
-static sc_time_t default_interval = 0;
+static sdb_time_t default_interval = 0;
 
 /*
  * private helper functions
  */
 
 static int
 
 /*
  * private helper functions
  */
 
 static int
-config_get_interval(oconfig_item_t *ci, sc_time_t *interval)
+config_get_interval(oconfig_item_t *ci, sdb_time_t *interval)
 {
        double interval_dbl = 0.0;
 
 {
        double interval_dbl = 0.0;
 
@@ -68,7 +68,7 @@ config_get_interval(oconfig_item_t *ci, sc_time_t *interval)
                return -1;
        }
 
                return -1;
        }
 
-       *interval = DOUBLE_TO_SC_TIME(interval_dbl);
+       *interval = DOUBLE_TO_SDB_TIME(interval_dbl);
        return 0;
 } /* config_get_interval */
 
        return 0;
 } /* config_get_interval */
 
@@ -93,8 +93,8 @@ daemon_load_backend(oconfig_item_t *ci)
        char  plugin_name[1024];
        char *name;
 
        char  plugin_name[1024];
        char *name;
 
-       sc_plugin_ctx_t ctx = SC_PLUGIN_CTX_INIT;
-       sc_plugin_ctx_t old_ctx;
+       sdb_plugin_ctx_t ctx = SDB_PLUGIN_CTX_INIT;
+       sdb_plugin_ctx_t old_ctx;
 
        int status, i;
 
 
        int status, i;
 
@@ -123,9 +123,9 @@ daemon_load_backend(oconfig_item_t *ci)
                }
        }
 
                }
        }
 
-       old_ctx = sc_plugin_set_ctx(ctx);
-       status = sc_plugin_load(plugin_name);
-       sc_plugin_set_ctx(old_ctx);
+       old_ctx = sdb_plugin_set_ctx(ctx);
+       status = sdb_plugin_load(plugin_name);
+       sdb_plugin_set_ctx(old_ctx);
        return status;
 } /* daemon_load_backend */
 
        return status;
 } /* daemon_load_backend */
 
@@ -144,7 +144,7 @@ daemon_configure_plugin(oconfig_item_t *ci)
                return -1;
        }
 
                return -1;
        }
 
-       return sc_plugin_configure(name, ci);
+       return sdb_plugin_configure(name, ci);
 } /* daemon_configure_backend */
 
 static token_parser_t token_parser_list[] = {
 } /* daemon_configure_backend */
 
 static token_parser_t token_parser_list[] = {