projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove elliptic curve stubs from gcrypt/, add PRF implementation.
[tinc]
/
src
/
sptps_test.c
diff --git
a/src/sptps_test.c
b/src/sptps_test.c
index
f83307f
..
9452ed1
100644
(file)
--- a/
src/sptps_test.c
+++ b/
src/sptps_test.c
@@
-357,8
+357,19
@@
int main(int argc, char *argv[]) {
fprintf(stderr, "Dropped.\n");
continue;
}
fprintf(stderr, "Dropped.\n");
continue;
}
- if(!sptps_receive_data(&s, buf, len) && !datagram)
- return 1;
+ char *bufp = buf;
+ while(len) {
+ size_t done = sptps_receive_data(&s, bufp, len);
+ if(!done) {
+ if(!datagram)
+ return 1;
+ } else {
+ break;
+ }
+
+ bufp += done;
+ len -= done;
+ }
}
}
}
}