/* send the file back to the requester */
+ dbase = ubik_dbase;
+
if ((code = ubik_CheckAuth(rxcall))) {
+ DBHOLD(dbase);
goto failed;
}
if (offset && offset != otherHost) {
/* we *know* this is the wrong guy */
code = USYNC;
+ DBHOLD(dbase);
goto failed;
}
- dbase = ubik_dbase;
DBHOLD(dbase);
/* abort any active trans that may scribble over the database */
#endif
code = rx_Read(rxcall, tbuffer, tlen);
if (code != tlen) {
- DBRELE(dbase);
ubik_dprint("Rx-read length error=%d\n", code);
code = BULK_ERROR;
close(fd);
code = write(fd, tbuffer, tlen);
pass++;
if (code != tlen) {
- DBRELE(dbase);
ubik_dprint("write failed error=%d\n", code);
code = UIOERROR;
close(fd);
#else
LWP_NoYieldSignal(&dbase->version);
#endif
- DBRELE(dbase);
- failed:
+
+failed:
if (code) {
unlink(pbuffer);
/* Failed to sync. Allow reads again for now. */
} else {
ubik_print("Ubik: Synchronize database completed\n");
}
+ DBRELE(dbase);
return code;
}