diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2005-01-24 18:26:54 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2005-01-24 18:26:54 +0000 |
commit | a5fcb1982de75e464c1c41a660975c5d8ab4b47b (patch) | |
tree | c719b5fd728204290d40174962539373404d9557 | |
parent | 3524d98e35685875e95daee7fa86a9c2178264a4 (diff) |
Adopt data size from the MTU
-rw-r--r-- | test/l2test.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/l2test.c b/test/l2test.c index 06233d3f..859ce079 100644 --- a/test/l2test.c +++ b/test/l2test.c @@ -70,7 +70,7 @@ static int imtu = 672; static int omtu = 0; /* Default data size */ -static long data_size = 672; +static long data_size = 0; /* Default addr and psm */ static bdaddr_t bdaddr; @@ -709,6 +709,13 @@ int main(int argc ,char *argv[]) exit(1); } + if (!data_size) { + if (imtu > data_size) + data_size = imtu; + if (omtu > data_size) + data_size = omtu; + } + if (!(buf = malloc(data_size))) { perror("Can't allocate data buffer"); exit(1); |