projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Only read one record at a time in sptps_receive_data().
[tinc]
/
src
/
meta.c
diff --git
a/src/meta.c
b/src/meta.c
index
1c29fe9
..
0849d3c
100644
(file)
--- a/
src/meta.c
+++ b/
src/meta.c
@@
-159,8
+159,14
@@
bool receive_meta(connection_t *c) {
}
do {
}
do {
- if(c->protocol_minor >= 2)
- return sptps_receive_data(&c->sptps, bufp, inlen);
+ if(c->protocol_minor >= 2) {
+ int len = sptps_receive_data(&c->sptps, bufp, inlen);
+ if(!len)
+ return false;
+ bufp += len;
+ inlen -= len;
+ continue;
+ }
if(!c->status.decryptin) {
endp = memchr(bufp, '\n', inlen);
if(!c->status.decryptin) {
endp = memchr(bufp, '\n', inlen);