From 16d90cd2586aa7309445d2d2d037733e7d425f9f Mon Sep 17 00:00:00 2001 From: keplyx Date: Tue, 19 May 2020 10:33:33 +0200 Subject: [PATCH] Changed default values --- src/mictcp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mictcp.c b/src/mictcp.c index 0d932a4..4fcdda4 100644 --- a/src/mictcp.c +++ b/src/mictcp.c @@ -8,10 +8,10 @@ #define DEBUG 1 -#define LOSS_RATE 2 +#define LOSS_RATE 10 #define TIMEOUT 2 -#define MAX_LOSS_RATE 2 -#define LIST_LENGTH 200 +#define MAX_LOSS_RATE 5 +#define LIST_LENGTH 30 struct mic_tcp_sock g_sock; int next_msg_num; @@ -53,7 +53,7 @@ int isLossAcceptable() { * Remove last element from the list and remove a success from count if removed element was a success */ void popLast() { - if (list.size > 0 ) { + if (list.size > 0) { struct node *last = list.tail; list.tail = last->previous; list.size--; @@ -258,7 +258,7 @@ int mic_tcp_send(int socket, char *mesg, int mesg_size) { if (result == -1 && errorDetected == 0) { errorDetected = 1; saveError(); - }else + } else if (result != -1) saveSuccess(); printList(); } while (result == -1 && isLossAcceptable() == 0);