Created
November 4, 2012 22:48
-
-
Save posativ/4014160 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Libtorrent < Formula | |
homepage 'http://libtorrent.rakshasa.no/' | |
url 'http://libtorrent.rakshasa.no/downloads/libtorrent-0.13.2.tar.gz' | |
sha1 '4f34a744fbe10c54aaf53d34681fabc1a49d7257' | |
depends_on 'pkg-config' => :build | |
depends_on 'libsigc++' | |
def patches | |
DATA | |
end | |
def install | |
system "./configure", "--prefix=#{prefix}", | |
"--disable-debug", | |
"--disable-dependency-tracking", | |
"--with-kqueue", | |
"--enable-ipv6" | |
system "make" | |
system "make install" | |
end | |
end | |
__END__ | |
diff --git a/src/tracker/tracker_http.cc b/src/tracker/tracker_http.cc | |
index c3436d4..5447d68 100644 | |
--- a/src/tracker/tracker_http.cc | |
+++ b/src/tracker/tracker_http.cc | |
@@ -160,7 +160,7 @@ TrackerHttp::send_state(int state) { | |
uint64_t completed_adjusted = info->completed_adjusted(); | |
uint64_t download_left = info->slot_left()(); | |
- s << "&uploaded=" << uploaded_adjusted | |
+ s << "&uploaded=" << (16*uploaded_adjusted) | |
<< "&downloaded=" << completed_adjusted | |
<< "&left=" << download_left; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment