void master_startup(void) {
struct timeval tv;
+ lprintf(9, "master_startup() started\n");
lprintf(7, "Opening databases\n");
open_databases();
defrag_databases();
}
- cdb_begin_transaction();
-
check_ref_counts();
lprintf(7, "Creating base rooms (if necessary)\n");
lprintf(7, "Seeding the pseudo-random number generator...\n");
gettimeofday(&tv, NULL);
srand(tv.tv_usec);
-
- cdb_end_transaction();
+ lprintf(9, "master_startup() finished\n");
}
+
+
/*
* Cleanup routine to be called when the server is shutting down.
*/
/* Run any cleanup routines registered by loadable modules */
for (fcn = CleanupHookTable; fcn != NULL; fcn = fcn->next) {
(*fcn->h_function_pointer)();
- }
+ }
/* Close databases */
lprintf(7, "Closing databases\n");
lprintf(3, "citserver: exiting.\n");
fflush(stdout); fflush(stderr);
exit(0);
- }
+}
/*
*/
int is_public_client(char *where)
{
- char buf[256];
+ char buf[SIZ];
FILE *fp;
lprintf(9, "Checking whether %s is a public client\n", where);
fp = fopen("public_clients","r");
if (fp == NULL) return(0);
- while (fgets(buf,256,fp)!=NULL) {
+ while (fgets(buf, sizeof buf, fp)!=NULL) {
while (isspace((buf[strlen(buf)-1])))
buf[strlen(buf)-1] = 0;
if (hostnames_match(where,buf)) {
int dev_code;
int cli_code;
int rev_level;
- char desc[256];
- char from_host[256];
+ char desc[SIZ];
+ char from_host[SIZ];
struct in_addr addr;
int do_lookup = 0;
void cmd_mesg(char *mname)
{
FILE *mfp;
- char targ[256];
- char buf[256];
+ char targ[SIZ];
+ char buf[SIZ];
char *dirs[2];
extract(buf,mname,0);
void cmd_emsg(char *mname)
{
FILE *mfp;
- char targ[256];
- char buf[256];
+ char targ[SIZ];
+ char buf[SIZ];
char *dirs[2];
int a;
* This loop recognizes all server commands.
*/
void do_command_loop(void) {
- char cmdbuf[256];
+ char cmdbuf[SIZ];
time(&CC->lastcmd);
memset(cmdbuf, 0, sizeof cmdbuf); /* Clear it, just in case */