From owner-svn-ports-head@FreeBSD.ORG Tue Jan 8 16:59:03 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B9C45BF1; Tue, 8 Jan 2013 16:59:03 +0000 (UTC) (envelope-from rakuco@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 89F88D54; Tue, 8 Jan 2013 16:59:03 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r08Gx3gp034544; Tue, 8 Jan 2013 16:59:03 GMT (envelope-from rakuco@svn.freebsd.org) Received: (from rakuco@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r08Gx3J1034542; Tue, 8 Jan 2013 16:59:03 GMT (envelope-from rakuco@svn.freebsd.org) Message-Id: <201301081659.r08Gx3J1034542@svn.freebsd.org> From: Raphael Kubo da Costa Date: Tue, 8 Jan 2013 16:59:03 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r310104 - in head/net-p2p/libktorrent: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2013 16:59:03 -0000 Author: rakuco Date: Tue Jan 8 16:59:02 2013 New Revision: 310104 URL: http://svnweb.freebsd.org/changeset/ports/310104 Log: Add my upstream patch to fix problems establishing UDP connections. KTorrent was unable to create any UDP connection (to Magnet or UDP trackers, for example) at all without this. Bump PORTREVISION. Approved by: makc (maintainer) Added: head/net-p2p/libktorrent/files/ head/net-p2p/libktorrent/files/patch-src__net__serversocket.cpp (contents, props changed) Modified: head/net-p2p/libktorrent/Makefile Modified: head/net-p2p/libktorrent/Makefile ============================================================================== --- head/net-p2p/libktorrent/Makefile Tue Jan 8 16:59:00 2013 (r310103) +++ head/net-p2p/libktorrent/Makefile Tue Jan 8 16:59:02 2013 (r310104) @@ -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,-.*,,}/ Added: head/net-p2p/libktorrent/files/patch-src__net__serversocket.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-p2p/libktorrent/files/patch-src__net__serversocket.cpp Tue Jan 8 16:59:02 2013 (r310104) @@ -0,0 +1,40 @@ +commit 881ef5274f281f52eab974a72e6c9a3c74157ead +Author: Joris Guisson +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; + } + +- + } +