Bug 169283 - [PATCH] net-p2p/ctorrent bugfix initial meta info failed
Summary: [PATCH] net-p2p/ctorrent bugfix initial meta info failed
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dirk Meyer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-21 06:40 UTC by dirk.meyer
Modified: 2013-06-11 05:50 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (1.08 KB, patch)
2012-06-21 06:40 UTC, dirk.meyer
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description dirk.meyer 2012-06-21 06:40:03 UTC
	try to decode a torrent with multiple files.
	ctorrent fails quite often do decode such.
		"error, initial meta info failed."

Fix: I tried this patch from the SF bugs:
http://sourceforge.net/tracker/?func=detail&aid=3159066&group_id=202532&atid=981959
I modified the patch slightly to git the freeBSD port.
with the patch applied I can decodede the torrent files.
How-To-Repeat: 
	ctorrent -c Batch.torrent
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-06-21 06:40:14 UTC
Responsible Changed
From-To: freebsd-ports-bugs->flz

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Florent Thoumie freebsd_committer freebsd_triage 2012-07-05 09:44:01 UTC
State Changed
From-To: open->feedback

Did you try to contact upstream developers about this issue?
Comment 3 dirk.meyer 2012-07-06 10:31:20 UTC
> State-Changed-From-To: open->feedback
> State-Changed-By: flz
> State-Changed-When: Thu Jul 5 08:44:01 UTC 2012
> State-Changed-Why: 
> Did you try to contact upstream developers about this issue?

The patch is from the bugtracker upstream.
http://sourceforge.net/tracker/?func=detail&aid=3159066&group_id=202532&atid=981959

Submitted 2011-01-15
Still no response on it.

kind regards Dirk

- Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany
- [dirk.meyer@dinoex.sub.org],[dirk.meyer@guug.de],[dinoex@FreeBSD.org]
http://people.freebsd.org/~dinoex/errorlogs/
Comment 4 Dirk Meyer freebsd_committer freebsd_triage 2013-02-16 11:28:23 UTC
State Changed
From-To: feedback->open

feedback reecived
Comment 5 Eygene Ryabinkin freebsd_committer freebsd_triage 2013-04-09 10:08:24 UTC
Works for me too.  Florent, what do you think about this patch given
that

 - maintainers of CTorrent are silent for some months already;

 - the problematic torrent files are created by uTorrent and contain
   the "file-media" field with negative values; that's permitted by
   the specification,
     http://www.bittorrent.org/beps/bep_0003.html
   and uTorrent behaviour is a well-known thing,
     http://forum.utorrent.com/viewtopic.php?pid=626732#p626732
     http://www.torrent-invites.com/help/180267-torrents-created-utorrent-3-1-not-working-rtorrent-0-8-9-a.html#post1178940
   so the fix looks really good.
-- 
Eygene Ryabinkin                                        ,,,^..^,,,
[ Life's unfair - but root password helps!           | codelabs.ru ]
[ 82FE 06BC D497 C0DE 49EC  4FF0 16AF 9EAE 8152 ECFB | freebsd.org ]
Comment 6 Dirk Meyer freebsd_committer freebsd_triage 2013-06-11 05:44:25 UTC
Responsible Changed
From-To: flz->dinoex

I will take care of it.
Comment 7 dfilter service freebsd_committer freebsd_triage 2013-06-11 05:44:26 UTC
Author: dinoex
Date: Tue Jun 11 04:44:18 2013
New Revision: 320530
URL: http://svnweb.freebsd.org/changeset/ports/320530

Log:
  - fix negative int bug
  - take maintainership
  PR:		169283
  Submitted by:	dinoex
  Approved by:	flz
  Obtained from:	http://sourceforge.net/tracker/?func=detail&aid=3159066&group_id=202532&atid=981959

Added:
  head/net-p2p/ctorrent/files/patch-negative-ints   (contents, props changed)
Modified:
  head/net-p2p/ctorrent/Makefile

Modified: head/net-p2p/ctorrent/Makefile
==============================================================================
--- head/net-p2p/ctorrent/Makefile	Tue Jun 11 03:42:47 2013	(r320529)
+++ head/net-p2p/ctorrent/Makefile	Tue Jun 11 04:44:18 2013	(r320530)
@@ -12,7 +12,7 @@ CATEGORIES=	net-p2p
 MASTER_SITES=	http://www.rahul.net/dholmes/ctorrent/
 DISTNAME=	${PORTNAME}-dnh${PORTVERSION}
 
-MAINTAINER=	flz@FreeBSD.org
+MAINTAINER=	dinoex@FreeBSD.org
 COMMENT=	BitTorrent Client written in C for FreeBSD and Linux
 
 GNU_CONFIGURE=	yes

Added: head/net-p2p/ctorrent/files/patch-negative-ints
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-p2p/ctorrent/files/patch-negative-ints	Tue Jun 11 04:44:18 2013	(r320530)
@@ -0,0 +1,15 @@
+allow negative integers ... should fix random "error, initial meta info failed"
+
+--- bencode.cpp.orig
++++ bencode.cpp
+@@ -44,6 +44,10 @@
+     p++; len--;
+   }
+ 
++  if( *p == '-'){
++    p++; len--;
++  }
++
+   for(psave = p; len && isdigit(*p); p++,len--) ;
+ 
+   if(!len || MAX_INT_SIZ < (p - psave) || *p != endchar) return 0;
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 8 Dirk Meyer freebsd_committer freebsd_triage 2013-06-11 05:44:49 UTC
State Changed
From-To: open->closed

committed, thanks.