diff options
author | Raphael Kubo da Costa <rakuco@FreeBSD.org> | 2013-01-08 16:59:02 +0000 |
---|---|---|
committer | Raphael Kubo da Costa <rakuco@FreeBSD.org> | 2013-01-08 16:59:02 +0000 |
commit | 6575b78ab693040dd143d67db9fe4275b4b0f393 (patch) | |
tree | 79ffac6e3ba3d09445432d47b38780c12ebc6b6d /net-p2p | |
parent | cde872c3416ae2c6d98ea64dec217b81095b9a76 (diff) |
Notes
Diffstat (limited to 'net-p2p')
-rw-r--r-- | net-p2p/libktorrent/Makefile | 1 | ||||
-rw-r--r-- | net-p2p/libktorrent/files/patch-src__net__serversocket.cpp | 40 |
2 files changed, 41 insertions, 0 deletions
diff --git a/net-p2p/libktorrent/Makefile b/net-p2p/libktorrent/Makefile index be5a16e62095..c558d4dbbd82 100644 --- a/net-p2p/libktorrent/Makefile +++ b/net-p2p/libktorrent/Makefile @@ -2,6 +2,7 @@ PORTNAME= libktorrent DISTVERSION= 1.3.0 +PORTREVISION= 1 CATEGORIES= net-p2p kde MASTER_SITES= http://ktorrent.org/downloads/${DISTVERSION:C,^1,4,:C,-.*,,}/ diff --git a/net-p2p/libktorrent/files/patch-src__net__serversocket.cpp b/net-p2p/libktorrent/files/patch-src__net__serversocket.cpp new file mode 100644 index 000000000000..7ca43adf20be --- /dev/null +++ b/net-p2p/libktorrent/files/patch-src__net__serversocket.cpp @@ -0,0 +1,40 @@ +commit 881ef5274f281f52eab974a72e6c9a3c74157ead +Author: Joris Guisson <joris.guisson@gmail.com> +Date: Thu Jan 3 18:51:13 2013 +0100 + + Fix bug causing UDP connections not to get established on FreeBSD because FIONREAD returns the size of the data and the peer address + + REVIEW: 108076 + +diff --git a/src/net/serversocket.cpp b/src/net/serversocket.cpp +index 5d39433..399b4b1 100644 +--- ./src/net/serversocket.cpp ++++ ./src/net/serversocket.cpp +@@ -133,9 +133,10 @@ namespace net + { + // The first packet may be 0 bytes in size + Buffer::Ptr buf = d->pool->get(ba < 1500 ? 1500 : ba); +- if (d->sock->recvFrom(buf->get(), ba, addr) == (int)ba && ba > 0) ++ int bytes_read = d->sock->recvFrom(buf->get(), ba, addr); ++ if (bytes_read <= (int)ba && ba > 0) + { +- buf->setSize(ba); ++ buf->setSize(bytes_read); + d->dhandler->dataReceived(buf, addr); + } + first = false; +@@ -154,7 +155,6 @@ namespace net + d->rsn->setEnabled(on); + } + +- + void ServerSocket::readyToWrite(int) + { + d->dhandler->readyToWrite(this); +@@ -186,6 +186,5 @@ namespace net + return false; + } + +- + } + |