Lines 52-58
static ssize_t write_reordered_swap(int
Link Here
|
52 |
test_ordering_phase = 0; |
52 |
test_ordering_phase = 0; |
53 |
/* send the new packet first */ |
53 |
/* send the new packet first */ |
54 |
stat = write(fd, buf, count); |
54 |
stat = write(fd, buf, count); |
55 |
if (stat != count) return stat; |
55 |
if ((size_t)stat != count) return stat; |
56 |
/* then send the old packet next */ |
56 |
/* then send the old packet next */ |
57 |
stat = write(fd, pocket_buf, pocket_count); |
57 |
stat = write(fd, pocket_buf, pocket_count); |
58 |
free(pocket_buf); |
58 |
free(pocket_buf); |
Lines 96-102
static ssize_t write_reordered_retransmi
Link Here
|
96 |
test_ordering_phase = 0; |
96 |
test_ordering_phase = 0; |
97 |
/* send the new packet first */ |
97 |
/* send the new packet first */ |
98 |
stat = write(fd, buf, count); |
98 |
stat = write(fd, buf, count); |
99 |
if (stat != count) return stat; |
99 |
if ((size_t)stat != count) return stat; |
100 |
/* send the buffered packets in normal order */ |
100 |
/* send the buffered packets in normal order */ |
101 |
for (n=0; n<test_length; n++) { |
101 |
for (n=0; n<test_length; n++) { |
102 |
stat = write(fd, pocket_buf[n], pocket_count[n]); |
102 |
stat = write(fd, pocket_buf[n], pocket_count[n]); |
Lines 142-148
static ssize_t write_reordered_reverse(i
Link Here
|
142 |
test_ordering_phase = 0; |
142 |
test_ordering_phase = 0; |
143 |
/* send the new packet first */ |
143 |
/* send the new packet first */ |
144 |
stat = write(fd, buf, count); |
144 |
stat = write(fd, buf, count); |
145 |
if (stat != count) return stat; |
145 |
if ((size_t)stat != count) return stat; |
146 |
/* send the buffered packets in reverse order */ |
146 |
/* send the buffered packets in reverse order */ |
147 |
for (n=test_length-1; n>0; n--) { |
147 |
for (n=test_length-1; n>0; n--) { |
148 |
stat = write(fd, pocket_buf[n], pocket_count[n]); |
148 |
stat = write(fd, pocket_buf[n], pocket_count[n]); |