/* Copyright (c) 1996, Ruslan R. Laishev (@RRL) */ #include "nntp.h" char *ID$IDcpy = "Copyright (c) 1996-97,Ruslan R. Laishev (@RRL)."; char *ID$IDsrv = "DNNTP/OVMS v 0.70"; char *ID$IDver = "DECThreads NNTP Server for OpenVMS Ver. 0.70."; /* *-------------------------------------------------------------------------------- */ void main (void) { pthread_t th; long status; NNTP_LOG(LOGI,ID$IDcpy); NNTP_LOG(LOGI,ID$IDver); NNTP_LOG(LOGI,"Get configuration information"); nntp_conf_get(); NNTP_LOG(LOGI,"Current configuration follows."); nntp_conf_out(); /* * */ NNTP_LOG(LOGI,"Opening News Messages DataBase"); if ( MsgDBopen() ) exit (errno); NNTP_LOG(LOGI,"Opening NewsGroups DataBase"); if ( GrpDBopen() ) exit (errno); NNTP_LOG(LOGI,"Opening Suck DataBase"); if ( SuckDBopen() ) exit (errno); NNTP_LOG(LOGI,"Opening Feed DataBase"); if ( FeedDBopen() ) exit (errno); /* * */ NNTP_InitBosses (); /* * */ status = pthread_create(&th,pthread_attr_default, NNTP_ClientBoss, (pthread_addr_t) 0); if (status == -1) { NNTP_LOG(LOGF,"Create Client Boss thread-%s.", strerror(errno)); } NNTP_LOG(LOGI,"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(LOGF,"Create Suck Boss thread-%s.", strerror(errno)); } NNTP_LOG(LOGI,"Create Suck Boss thread-Ok (Tid:%d).",th); /* * */ status = pthread_create(&th,pthread_attr_default, NNTP_FeedBoss, (pthread_addr_t) 0); if (status == -1) { NNTP_LOG(LOGF,"Create Feed Boss thread-%s.", strerror(errno)); } NNTP_LOG(LOGI,"Create Feed Boss thread-Ok (Tid:%d).",th); sys$hiber(); DBclose(); NNTP_LOG(LOGI,"%s-End.",ID$IDver); }