/* Copyright (c) 1996, Ruslan R. Laishev (@RRL) */ #include "nntp.h" #include "nntp_worker.h" #include "nntp_rms.h" #include "nntp_lib.h" #include "nntp_log.h" #include "nntp_conf.h" /* *-------------------------------------------------------------------------------- */ void main (void) { pthread_t th; long status; nntp_log(logi,(stdout,ID$IDcpy)); nntp_log(logi,(stdout,ID$IDver)); nntp_log(logi,(stdout,"Get configuration information")); nntp_conf_get(); nntp_log(logi,(stdout,"Current configuration follows.")); nntp_log(logi,(stdout,"LocalHost\t\t-%s",nntp_conf.LocalHost)); nntp_log(logi,(stdout,"LocalTZ\t\t-%s",nntp_conf.LocalTZ)); nntp_log(logi,(stdout,"LocalPort\t\t-%d",nntp_conf.LocalPort)); nntp_log(logi,(stdout,"MsgDBsize\t\t-%d",nntp_conf.MsgDBsize)); nntp_log(logi,(stdout,"MsgPurgeDay\t-%d",nntp_conf.MsgPurgeDay)); nntp_log(logi,(stdout,"MsgPurgeNum\t-%d",nntp_conf.MsgPurgeNum)); nntp_log(logi,(stdout,"ClienTimeOut\t-%d",nntp_conf.ClientTimeOut)); nntp_log(logi,(stdout,"SuckTimeOut\t-%d",nntp_conf.SuckTimeOut)); nntp_log(logi,(stdout,"FeedTimeOut\t-%d",nntp_conf.FeedTimeOut)); nntp_log(logi,(stdout,"GrpME\t\t-%s",nntp_conf.GrpME)); nntp_log(logi,(stdout,"GrpDay\t\t-%d",nntp_conf.GrpDay)); nntp_log(logi,(stdout,"Suck\t\t-%s",nntp_conf.Suck)); nntp_log(logi,(stdout,"Feed\t\t-%s",nntp_conf.Feed)); nntp_log(logi,(stdout,"Client\t\t-%s",nntp_conf.Client)); nntp_log(logi,(stdout,"LogLevel\t\t-%d",nntp_conf.LogLevel)); nntp_log(logi,(stdout,"Update\t\t-%d",nntp_conf.Update)); nntp_log(logi,(stdout,"Expire\t\t-%d",nntp_conf.Expire)); nntp_log(logi,(stdout,"Opening News Messages DataBase")); MsgDBopen(); nntp_log(logw,(stdout,"Opening News Messages DataBase - Ok")); nntp_log(logi,(stdout,"Opening NewsGroups DataBase")); GrpDBopen(); nntp_log(logw,(stdout,"Opening NewsGroups DataBase - Ok")); nntp_log(logi,(stdout,"Opening Suck DataBase")); SuckDBopen(); nntp_log(logw,(stdout,"Opening Suck DataBase - Ok")); status = pthread_create(&th,pthread_attr_default, NNTP_ClientBoss, (pthread_addr_t) 0); if (status == -1) { nntp_log_err (errno); nntp_log(logf,(stdout,"Create Client Boss thread-Error.")); } nntp_log(logi,(stdout,"Create Client Boss thread-Ok (Tid:%d).",th)); status = pthread_create(&th,pthread_attr_default, NNTP_SuckBoss, (pthread_addr_t) 0); if (status == -1) { nntp_log_err (errno); nntp_log(logf,(stdout,"Create Suck Boss thread-Error.")); } nntp_log(logi,(stdout,"Create Suck Boss thread-Ok (Tid:%d).",th)); while(1); DBclose(); nntp_log(logi,(stdout,"DECThreads NNTP Server for OpenVMS Ver. 0.00-End.")); }