Skip to content
Snippets Groups Projects
Commit 41cc2ac8 authored by ucart's avatar ucart
Browse files

added prints so we know when we are in the middle of logging

parent 1ffc89e9
No related branches found
No related tags found
No related merge requests found
......@@ -764,6 +764,7 @@ static void client_recv(int fd) {
static void quad_recv() {
static unsigned char respBuf[CMD_MAX_LENGTH];
static size_t respBufLen;
static int receiving_logs;
struct metadata m;
uint8_t data[CMD_MAX_LENGTH];
......@@ -836,7 +837,13 @@ static void quad_recv() {
quadlog_file = fopen(log_file, "a");
quadlog_file_open = 1;
}
//printf("(Quad) : Log found\n");
if (!receiving_logs) {
printf("(Quad) : Log found\n");
receiving_logs = 1;
} else {
printf(".");
fflush(0);
}
fwrite((char *) data, sizeof(char), m.data_len, quadlog_file);
break;
case RESPPARAM_ID:
......@@ -851,7 +858,8 @@ static void quad_recv() {
fclose(quadlog_file);
quadlog_file_open = 0;
}
printf("(Quad) : Log End found\n");
printf("\n(Quad) : Log End found\n");
receiving_logs = 0;
break;
default:
printf("(Backend): message type %d ignored from quad\n", m.msg_type);
......@@ -953,7 +961,7 @@ void findTimeDiff(int respID) {
char * create_log_name(char * buffer, size_t max) {
static const char * prefix = "logs";
static size_t num_logs = 0;
static const char * format_string = "%Y-%m-%e_%-l:%M";
static const char * format_string = "%F_%-l:%M";
time_t curr_time;
char c_time_string[256];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment