mirror of
https://github.com/fumiama/simple-dict.git
synced 2026-06-10 13:10:31 +08:00
Merge branch 'main' of https://github.com/fumiama/simple-dict-server into main
This commit is contained in:
5
server.c
5
server.c
@@ -133,12 +133,11 @@ int free_after_send(int accept_fd, char *data, size_t length) {
|
||||
int send_all(THREADTIMER *timer) {
|
||||
int re = 1;
|
||||
FILE *fp = open_dict(LOCK_SH);
|
||||
size_t numbytes;
|
||||
if(fp) {
|
||||
timer->fp = fp;
|
||||
timer->is_open = 1;
|
||||
off_t len = 0;
|
||||
sprintf(timer->data, "%zd", fileSize(file_path));
|
||||
off_t len = 0, file_size = fileSize(file_path);
|
||||
sprintf(timer->data, "%zd", file_size);
|
||||
printf("Get file size: %s bytes.\n", timer->data);
|
||||
uint32_t head_len = strlen(timer->data);
|
||||
#if __APPLE__
|
||||
|
||||
Reference in New Issue
Block a user