#include "vlserver.h"
#include "vlserver_internal.h"
-#define MAXLWP 16
+#define MAXLWP 64
struct afsconf_dir *vldb_confdir = 0; /* vldb configuration dir */
int lwps = 9;
code = afsconf_IsLocalRealmMatch(dir, &islocal, name, inst, cell);
if (code) {
- ViceLog(0,
+ VLog(0,
("Failed local realm check; code=%d, name=%s, inst=%s, cell=%s\n",
code, name, inst, cell));
}
tdir = afsconf_Open(configDir);
if (!tdir) {
- printf
+ VLog(0,
("vlserver: can't open configuration files in dir %s, giving up.\n",
- configDir);
+ configDir));
exit(1);
}
/* initialize winsock */
if (afs_winsockInit() < 0) {
ReportErrorEventAlt(AFSEVT_SVR_WINSOCK_INIT_FAILED, 0, argv[0], 0);
- fprintf(stderr, "vlserver: couldn't initialize winsock. \n");
+ VLog(0, ("vlserver: couldn't initialize winsock. \n"));
exit(1);
}
#endif
gethostname(hostname, sizeof(hostname));
th = gethostbyname(hostname);
if (!th) {
- printf("vlserver: couldn't get address of this host (%s).\n",
- hostname);
+ VLog(0, ("vlserver: couldn't get address of this host (%s).\n",
+ hostname));
exit(1);
}
memcpy(&myHost, th->h_addr, sizeof(afs_uint32));
if (AFSDIR_SERVER_NETRESTRICT_FILEPATH ||
AFSDIR_SERVER_NETINFO_FILEPATH) {
char reason[1024];
- ccode = parseNetFiles(SHostAddrs, NULL, NULL,
- ADDRSPERSITE, reason,
- AFSDIR_SERVER_NETINFO_FILEPATH,
- AFSDIR_SERVER_NETRESTRICT_FILEPATH);
+ ccode = afsconf_ParseNetFiles(SHostAddrs, NULL, NULL,
+ ADDRSPERSITE, reason,
+ AFSDIR_SERVER_NETINFO_FILEPATH,
+ AFSDIR_SERVER_NETRESTRICT_FILEPATH);
} else
#endif
{
}
if (rxMaxMTU != -1) {
if (rx_SetMaxMTU(rxMaxMTU) != 0) {
- printf("rxMaxMTU %d invalid\n", rxMaxMTU);
+ VLog(0, ("rxMaxMTU %d invalid\n", rxMaxMTU));
return -1;
}
}
ubik_ServerInitByInfo(myHost, htons(AFSCONF_VLDBPORT), &info, clones,
vl_dbaseName, &VL_dbase);
if (code) {
- printf("vlserver: Ubik init failed: %s\n", afs_error_message(code));
+ VLog(0, ("vlserver: Ubik init failed: %s\n", afs_error_message(code)));
exit(2);
}
rx_SetRxDeadTime(50);
securityClasses, numClasses,
VL_ExecuteRequest);
if (tservice == (struct rx_service *)0) {
- printf("vlserver: Could not create VLDB_SERVICE rx service\n");
+ VLog(0, ("vlserver: Could not create VLDB_SERVICE rx service\n"));
exit(3);
}
rx_SetMinProcs(tservice, 2);
securityClasses, numClasses,
RXSTATS_ExecuteRequest);
if (tservice == (struct rx_service *)0) {
- printf("vlserver: Could not create rpc stats rx service\n");
+ VLog(0, ("vlserver: Could not create rpc stats rx service\n"));
exit(3);
}
rx_SetMinProcs(tservice, 2);
rx_SetMaxProcs(tservice, 4);
LogCommandLine(argc, argv, "vlserver", VldbVersion, "Starting AFS", FSLog);
- printf("%s\n", cml_version_number); /* Goes to the log */
+ if (afsconf_GetLatestKey(tdir, NULL, NULL) == 0) {
+ LogDesWarning();
+ }
+ VLog(0, ("%s\n", cml_version_number));
/* allow super users to manage RX statistics */
rx_SetRxStatUserOk(vldb_rxstat_userok);