mirror of
https://github.com/SChernykh/p2pool.git
synced 2025-03-12 09:29:51 +00:00
API: fixed error messages
This commit is contained in:
parent
dc4b88d08e
commit
6615fa67f5
1 changed files with 8 additions and 8 deletions
|
@ -148,7 +148,7 @@ void p2pool_api::dump_to_file()
|
|||
|
||||
const int result = uv_fs_open(uv_default_loop_checked(), &work->req, work->tmp_name.c_str(), flags, 0644, on_fs_open);
|
||||
if (result < 0) {
|
||||
LOGWARN(4, "failed to open " << it.first << ", error " << uv_err_name(result));
|
||||
LOGWARN(4, "failed to open " << work->tmp_name << ", error " << uv_err_name(result));
|
||||
delete work;
|
||||
}
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ void p2pool_api::on_fs_open(uv_fs_t* req)
|
|||
uv_fs_req_cleanup(req);
|
||||
|
||||
if (work->fd < 0) {
|
||||
LOGWARN(4, "failed to open " << work->name << ", error " << uv_err_name(work->fd));
|
||||
LOGWARN(4, "failed to open " << work->tmp_name << ", error " << uv_err_name(work->fd));
|
||||
delete work;
|
||||
return;
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ void p2pool_api::on_fs_open(uv_fs_t* req)
|
|||
|
||||
const int result = uv_fs_write(uv_default_loop_checked(), &work->req, static_cast<uv_file>(work->fd), buf, 1, 0, on_fs_write);
|
||||
if (result < 0) {
|
||||
LOGWARN(4, "failed to write to " << work->name << ", error " << uv_err_name(result));
|
||||
LOGWARN(4, "failed to write to " << work->tmp_name << ", error " << uv_err_name(result));
|
||||
delete work;
|
||||
return;
|
||||
}
|
||||
|
@ -183,14 +183,14 @@ void p2pool_api::on_fs_write(uv_fs_t* req)
|
|||
DumpFileWork* work = reinterpret_cast<DumpFileWork*>(req->data);
|
||||
|
||||
if (req->result < 0) {
|
||||
LOGWARN(4, "failed to write to " << work->name << ", error " << uv_err_name(static_cast<int>(req->result)));
|
||||
LOGWARN(4, "failed to write to " << work->tmp_name << ", error " << uv_err_name(static_cast<int>(req->result)));
|
||||
}
|
||||
|
||||
uv_fs_req_cleanup(req);
|
||||
|
||||
const int result = uv_fs_close(uv_default_loop_checked(), &work->req, static_cast<uv_file>(work->fd), on_fs_close);
|
||||
if (result < 0) {
|
||||
LOGWARN(4, "failed to close " << work->name << ", error " << uv_err_name(result));
|
||||
LOGWARN(4, "failed to close " << work->tmp_name << ", error " << uv_err_name(result));
|
||||
delete work;
|
||||
return;
|
||||
}
|
||||
|
@ -201,14 +201,14 @@ void p2pool_api::on_fs_close(uv_fs_t* req)
|
|||
DumpFileWork* work = reinterpret_cast<DumpFileWork*>(req->data);
|
||||
|
||||
if (req->result < 0) {
|
||||
LOGWARN(4, "failed to close " << work->name << ", error " << uv_err_name(static_cast<int>(req->result)));
|
||||
LOGWARN(4, "failed to close " << work->tmp_name << ", error " << uv_err_name(static_cast<int>(req->result)));
|
||||
}
|
||||
|
||||
uv_fs_req_cleanup(req);
|
||||
|
||||
const int result = uv_fs_rename(uv_default_loop_checked(), &work->req, work->tmp_name.c_str(), work->name.c_str(), on_fs_rename);
|
||||
if (result < 0) {
|
||||
LOGWARN(4, "failed to rename " << work->tmp_name << ", error " << uv_err_name(result));
|
||||
LOGWARN(4, "failed to rename " << work->tmp_name << " to " << work->name << ", error " << uv_err_name(result));
|
||||
delete work;
|
||||
return;
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ void p2pool_api::on_fs_rename(uv_fs_t* req)
|
|||
DumpFileWork* work = reinterpret_cast<DumpFileWork*>(req->data);
|
||||
|
||||
if (req->result < 0) {
|
||||
LOGWARN(4, "failed to rename " << work->tmp_name << ", error " << uv_err_name(static_cast<int>(req->result)));
|
||||
LOGWARN(4, "failed to rename " << work->tmp_name << " to " << work->name << ", error " << uv_err_name(static_cast<int>(req->result)));
|
||||
}
|
||||
|
||||
uv_fs_req_cleanup(req);
|
||||
|
|
Loading…
Reference in a new issue