projects
/
swift-upb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b46e9e
)
no repeated data accept (and no rep acks)
author
Victor Grishchenko
<victor.grishchenko@gmail.com>
Wed, 13 Oct 2010 14:34:00 +0000
(16:34 +0200)
committer
Victor Grishchenko
<victor.grishchenko@gmail.com>
Wed, 13 Oct 2010 14:34:00 +0000
(16:34 +0200)
sendrecv.cpp
patch
|
blob
|
history
diff --git
a/sendrecv.cpp
b/sendrecv.cpp
index
530c27b
..
1f808ba
100644
(file)
--- a/
sendrecv.cpp
+++ b/
sendrecv.cpp
@@
-320,7
+320,8
@@
bin64_t Channel::OnData (Datagram& dgram) { // TODO: HAVE NONE for corrupted da
bin64_t pos = dgram.Pull32();
uint8_t *data;
int length = dgram.Pull(&data,1024);
- bool ok = (pos==bin64_t::NONE) || file().OfferData(pos, (char*)data, length) ;
+ bool ok = (pos==bin64_t::NONE) ||
+ (!file().ack_out().get(pos) && file().OfferData(pos, (char*)data, length) );
dprintf("%s #%u %cdata %s\n",tintstr(),id_,ok?'-':'!',pos.str());
data_in_ = tintbin(NOW,bin64_t::NONE);
if (!ok)