Changed default values
This commit is contained in:
parent
3e93bf42f6
commit
16d90cd258
1 changed files with 5 additions and 5 deletions
10
src/mictcp.c
10
src/mictcp.c
|
|
@ -8,10 +8,10 @@
|
||||||
|
|
||||||
#define DEBUG 1
|
#define DEBUG 1
|
||||||
|
|
||||||
#define LOSS_RATE 2
|
#define LOSS_RATE 10
|
||||||
#define TIMEOUT 2
|
#define TIMEOUT 2
|
||||||
#define MAX_LOSS_RATE 2
|
#define MAX_LOSS_RATE 5
|
||||||
#define LIST_LENGTH 200
|
#define LIST_LENGTH 30
|
||||||
|
|
||||||
struct mic_tcp_sock g_sock;
|
struct mic_tcp_sock g_sock;
|
||||||
int next_msg_num;
|
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
|
* Remove last element from the list and remove a success from count if removed element was a success
|
||||||
*/
|
*/
|
||||||
void popLast() {
|
void popLast() {
|
||||||
if (list.size > 0 ) {
|
if (list.size > 0) {
|
||||||
struct node *last = list.tail;
|
struct node *last = list.tail;
|
||||||
list.tail = last->previous;
|
list.tail = last->previous;
|
||||||
list.size--;
|
list.size--;
|
||||||
|
|
@ -258,7 +258,7 @@ int mic_tcp_send(int socket, char *mesg, int mesg_size) {
|
||||||
if (result == -1 && errorDetected == 0) {
|
if (result == -1 && errorDetected == 0) {
|
||||||
errorDetected = 1;
|
errorDetected = 1;
|
||||||
saveError();
|
saveError();
|
||||||
}else
|
} else if (result != -1)
|
||||||
saveSuccess();
|
saveSuccess();
|
||||||
printList();
|
printList();
|
||||||
} while (result == -1 && isLossAcceptable() == 0);
|
} while (result == -1 && isLossAcceptable() == 0);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue