1
0
mirror of https://github.com/fumiama/simple-kanban.git synced 2026-06-09 02:30:25 +08:00

增加错误输出

This commit is contained in:
fumiama
2021-05-05 22:42:07 +08:00
parent 6a76606632
commit 1db5dd405f

View File

@@ -130,7 +130,6 @@ int send_all(char* file_path, THREADTIMER *timer) {
hdtr.trailers = NULL;
hdtr.trl_cnt = 0;
re = !sendfile(fileno(fp), timer->accept_fd, 0, &len, &hdtr, 0);
//if(!re) perror("Sendfile");
#else
send(timer->accept_fd, &file_size, sizeof(uint32_t), 0);
re = !sendfile(timer->accept_fd, fileno(fp), &len, file_size);
@@ -139,6 +138,7 @@ int send_all(char* file_path, THREADTIMER *timer) {
close_file(fp);
timer->is_open = 0;
}
if(!re) perror("Sendfile");
return re;
}