From 7c67a3a1f1e0e399aaba48851989c7779bce50aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Wed, 26 Oct 2022 15:55:16 +0800 Subject: [PATCH] fix set --- server.c | 4 ++-- uploader/push.sh | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/server.c b/server.c index a4d05d0..ce376f8 100644 --- a/server.c +++ b/server.c @@ -405,7 +405,7 @@ static FILE *open_file(char* file_path, int lock_type, char* mode) { file_mode &= ~lock_type; return NULL; } - printf("Open file in mode %s\n", mode); + printf("Open file %s in mode %s\n", file_path, mode); return fp; } @@ -556,7 +556,7 @@ static int s3_set_data(threadtimer_t *timer) { printf("Set data size: %u\n", file_size); int is_first_data = 0; if(timer->numbytes == sizeof(uint32_t)) { - if((timer->numbytes = recv(timer->accept_fd, timer->data, TIMERDATSZ, MSG_DONTWAIT)) <= 0) { + if((timer->numbytes = recv(timer->accept_fd, timer->data, TIMERDATSZ, MSG_DONTWAIT)) < 0) { *(uint32_t*)ret = *(uint32_t*)"erro"; goto S3_RETURN; } diff --git a/uploader/push.sh b/uploader/push.sh index bc78b6c..292562c 100755 --- a/uploader/push.sh +++ b/uploader/push.sh @@ -11,12 +11,10 @@ $kanban EOF echo md5:${md5val##* } | tr -d '\n' >> $3 cat > cmd_seq.txt << EOF -$5set$6 -dat +$5$6dat file $4 -set$6 -ver +$6ver file $3 quit