

#include<stdio.h>
#include<unistd.h>
#include<netinet/in.h>
#include<string.h>
#include<stdlib.h>
#include<pthread.h>


#include"zither.h"
#include<almemsys/almemsys.h>


extern global_data_t gd;


int set_data(void)
{

gd.exid.uid = 0;
gd.db_select = safe_memcpy(gd.db_select, "PGSQL", LOGPATH_LEN);
gd.on_bcc = safe_memcpy(gd.on_bcc, "NOT", LOGPATH_LEN);
gd.fp.errlog = safe_memcpy(gd.fp.errlog, "/tmp/zither_err.log", LOGPATH_LEN);
gd.pg.postgres_data = safe_memcpy(gd.pg.postgres_data, "'127.0.0.1' port='5432' dbname='test'", LOGPATH_LEN);
gd.pg.pg_webserver = safe_memcpy(gd.pg.pg_webserver, "localhost", LOGPATH_LEN);
gd.pg.postgres_stat = 0;

gd.mysql.mysql_server = safe_memcpy(gd.mysql.mysql_server, "127.0.0.1", LOGPATH_LEN);
gd.mysql.mysql_username = safe_memcpy(gd.mysql.mysql_username, "masashi", LOGPATH_LEN);
gd.mysql.mysql_password = safe_memcpy(gd.mysql.mysql_password, "passwd", LOGPATH_LEN);
gd.mysql.mysql_db = safe_memcpy(gd.mysql.mysql_db, "zither", LOGPATH_LEN);

gd.fp.connectlog = safe_memcpy(gd.fp.connectlog, "/tmp/zither_connect.log", LOGPATH_LEN);
gd.fp.file_conf = safe_memcpy(gd.fp.file_conf, "/tmp/", LOGPATH_LEN);
gd.fp.lock_path = safe_memcpy(gd.fp.lock_path, "/tmp/", LOGPATH_LEN);
gd.fp.clock_path = safe_memcpy(gd.fp.clock_path, "/var/tmp/", LOGPATH_LEN);
gd.fp.neg_conf = "/etc/neg.conf";              /* read onlly */
gd.ms.ip_addr = safe_memcpy(gd.ms.ip_addr, "127.0.0.1", IP_LEN);
gd.ms.port = 9999;
gd.ms.max_count = 2;
gd.md.ch_MailFrom = safe_memcpy(gd.md.ch_MailFrom, "zither@localhost", IP_LEN);
gd.md.ch_MailRcptTo = safe_memcpy(gd.md.ch_MailRcptTo,"root@localshot",IP_LEN);
gd.md.ch_MailServ = safe_memcpy(gd.md.ch_MailServ, "localhost", IP_LEN);
gd.md.in_mailonoff = 1;
gd.md.ch_MailCc = safe_memcpy(gd.md.ch_MailCc,"NOT",IP_LEN);
gd.bs.life_int = 10;
gd.bs.life_los = 5;
#ifdef SIGNATURE_MODE
gd.sig.sig_filename = safe_memcpy(gd.sig.sig_filename, "/tmp/sig.list", LOGPATH_LEN);
gd.sig.sig_interval = 300;
#endif

if(gd.cron_onoff < 0){ gd.cron_onoff = 0; }

gd.fi.midump_filename = safe_memcpy(gd.fi.midump_filename, "/usr/local/zither/conf/mid.txt", BUF_SLEN);
gd.fi.midump_filename_2 = safe_memcpy(gd.fi.midump_filename_2, "/usr/local/zither/conf/mid_2.txt", BUF_SLEN);

// gd.td.midcount = B_MID;   // mid max
// gd.td.midint = MID_INT;   // mid auto dump interval

return 0;
}

