code = rx_Write(rxcall, (char *)&tlen, sizeof(afs_int32));
if (code != sizeof(afs_int32)) {
DBRELE(dbase);
- ubik_dprint("Rx-write length error=%d\n", code);
+ ViceLog(0, ("Rx-write length error=%d\n", code));
return BULK_ERROR;
}
offset = 0;
code = (*dbase->read) (dbase, file, tbuffer, offset, tlen);
if (code != tlen) {
DBRELE(dbase);
- ubik_dprint("read failed error=%d\n", code);
+ ViceLog(0, ("read failed error=%d\n", code));
return UIOERROR;
}
code = rx_Write(rxcall, tbuffer, tlen);
if (code != tlen) {
DBRELE(dbase);
- ubik_dprint("Rx-write length error=%d\n", code);
+ ViceLog(0, ("Rx-write length error=%d\n", code));
return BULK_ERROR;
}
length -= tlen;
if (offset && offset != otherHost) {
/* we *know* this is the wrong guy */
char sync_hoststr[16];
- ubik_print
+ ViceLog(0,
("Ubik: Refusing synchronization with server %s since it is not the sync-site (%s).\n",
afs_inet_ntoa_r(otherHost, hoststr),
- afs_inet_ntoa_r(offset, sync_hoststr));
+ afs_inet_ntoa_r(offset, sync_hoststr)));
return USYNC;
}
/* abort any active trans that may scribble over the database */
urecovery_AbortAll(dbase);
- ubik_print("Ubik: Synchronize database with server %s\n",
- afs_inet_ntoa_r(otherHost, hoststr));
+ ViceLog(0, ("Ubik: Synchronize database via DISK_SendFile from server %s\n",
+ afs_inet_ntoa_r(otherHost, hoststr)));
offset = 0;
UBIK_VERSION_LOCK;
#endif
code = rx_Read(rxcall, tbuffer, tlen);
if (code != tlen) {
- ubik_dprint("Rx-read length error=%d\n", code);
+ ViceLog(0, ("Rx-read length error=%d\n", code));
code = BULK_ERROR;
close(fd);
goto failed;
code = write(fd, tbuffer, tlen);
pass++;
if (code != tlen) {
- ubik_dprint("write failed error=%d\n", code);
+ ViceLog(0, ("write failed tlen=%d, error=%d\n", tlen, code));
code = UIOERROR;
close(fd);
goto failed;
(*dbase->setlabel) (dbase, file, &tversion);
UBIK_VERSION_UNLOCK;
}
- ubik_print
- ("Ubik: Synchronize database with server %s failed (error = %d)\n",
- afs_inet_ntoa_r(otherHost, hoststr), code);
+ ViceLog(0, ("Ubik: Synchronize database with server %s failed (error = %d)\n",
+ afs_inet_ntoa_r(otherHost, hoststr), code));
} else {
uvote_set_dbVersion(*avers);
- ubik_print("Ubik: Synchronize database completed\n");
+ ViceLog(0, ("Ubik: Synchronize database completed\n"));
}
DBRELE(dbase);
return code;
/* if (probableMatch) */
/* inconsistent addresses in CellServDB */
if (!probableMatch || found) {
- ubik_print("Inconsistent Cell Info from server:\n");
+ ViceLog(0, ("Inconsistent Cell Info from server:\n"));
for (i = 0; i < UBIK_MAX_INTERFACE_ADDR && inAddr->hostAddr[i]; i++)
- ubik_print("... %s\n", afs_inet_ntoa_r(htonl(inAddr->hostAddr[i]), hoststr));
+ ViceLog(0, ("... %s\n", afs_inet_ntoa_r(htonl(inAddr->hostAddr[i]), hoststr)));
fflush(stdout);
fflush(stderr);
printServerInfo();
for (i = 1; i < UBIK_MAX_INTERFACE_ADDR; i++)
ts->addr[i] = htonl(inAddr->hostAddr[i]);
- ubik_print("ubik: A Remote Server has addresses:\n");
+ ViceLog(0, ("ubik: A Remote Server has addresses:\n"));
for (i = 0; i < UBIK_MAX_INTERFACE_ADDR && ts->addr[i]; i++)
- ubik_print("... %s\n", afs_inet_ntoa_r(ts->addr[i], hoststr));
+ ViceLog(0, ("... %s\n", afs_inet_ntoa_r(ts->addr[i], hoststr)));
UBIK_ADDR_UNLOCK;
int i, j = 1;
char hoststr[16];
- ubik_print("Local CellServDB:\n");
+ ViceLog(0, ("Local CellServDB:\n"));
for (ts = ubik_servers; ts; ts = ts->next, j++) {
- ubik_print(" Server %d:\n", j);
+ ViceLog(0, (" Server %d:\n", j));
for (i = 0; (i < UBIK_MAX_INTERFACE_ADDR) && ts->addr[i]; i++)
- ubik_print(" ... %s\n", afs_inet_ntoa_r(ts->addr[i], hoststr));
+ ViceLog(0, (" ... %s\n", afs_inet_ntoa_r(ts->addr[i], hoststr)));
}
}