git-svn-id: https://ttuki.vtt.fi/svn/p2p-next/TUD/p2tp/trunk@590
e16421f0-f15b-0410-abcd-
98678b794739
complete_(0), completek_(0)
{
fd_ = open(filename,OPENFLAGS,S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
- if (fd_<0)
+ if (fd_<0) {
+ print_error("cannot open the file");
return;
+ }
char hfn[1024] = "";
if (!hash_filename) {
strcat(hfn, filename);
} else
strcpy(hfn,hash_filename);
hash_fd_ = open(hfn,OPENFLAGS,S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
- if (hash_fd_<0)
+ if (hash_fd_<0) {
+ print_error("cannot open hash file");
return;
+ }
if (root_hash_==Sha1Hash::ZERO) { // fresh submit, hash it
assert(file_size(fd_));
Submit();