Skip to content
Permalink
Browse files

update to libtorrent 1.2.1, NDK 19c, boost 1.70.0, version 1.2.1.0 (#41)

  • Loading branch information...
aldenml committed May 5, 2019
1 parent 747b47d commit 34f8ff58ac111b2bd71f494375a175f51b0f8f39
@@ -20,12 +20,12 @@ branches:

before_install:
# boost: download and bootstrap
- wget -nv -O boost.zip https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.zip
- wget -nv -O boost.zip https://dl.bintray.com/boostorg/release/1.70.0/source/boost_1_70_0.zip
- unzip -qq boost.zip
- cd boost_1_69_0
- cd boost_1_70_0
- ./bootstrap.sh
- cd ..
- export BOOST_ROOT=$PWD/boost_1_69_0
- export BOOST_ROOT=$PWD/boost_1_70_0

# openssl: download
- wget -nv -O openssl.tar.gz https://www.openssl.org/source/openssl-1.1.1b.tar.gz
@@ -41,7 +41,7 @@ before_install:
# libtorrent: download and checkout revision
- git clone https://github.com/arvidn/libtorrent
- cd libtorrent
- git checkout 381d5a3c5d170c7e2cbcfe231c8e6108391327d7
- git checkout 4b268297c4cf7beefd6d90e45e2f5c2a2284a870
- cd ..
- export LIBTORRENT_ROOT=$PWD/libtorrent
# perform android specific modifications for posix calls
@@ -58,10 +58,10 @@ before_install:

# android ndk: download and create toolchain
- if [ $os_build == "android" ]; then
wget -nv -O android-ndk.zip https://dl.google.com/android/repository/android-ndk-r19b-linux-x86_64.zip;
wget -nv -O android-ndk.zip https://dl.google.com/android/repository/android-ndk-r19c-linux-x86_64.zip;
echo "Extracting NDK...wait";
unzip -qq android-ndk.zip;
export NDK=$PWD/android-ndk-r19b;
export NDK=$PWD/android-ndk-r19c;
$NDK/build/tools/make_standalone_toolchain.py --arch $os_arch --api $android_api --stl libc++ --install-dir android-toolchain;
export ANDROID_TOOLCHAIN=$PWD/android-toolchain;
fi
@@ -4,7 +4,7 @@ apply plugin: 'maven'

group 'org.libtorrent4j'
archivesBaseName = 'libtorrent4j'
version '1.2.0.22'
version '1.2.1.0'

sourceCompatibility = '1.7'
targetCompatibility = '1.7'
@@ -1,3 +1,23 @@
1.2.1.0

* using android NDK r19c
* updated to boost 1.70.0
* removed support for FreeBSD
* lt:make sure session cleanup releases all its references to torrents
* lt:track the mapped port for each NAT mapping transport
* lt:optimize resolve_duplicate_filenames_slow()
* lt:use a more restrictive limit on number of pieces allowed in a torrent
* lt:improve disk I/O logging
* lt:always flush disk I/O job queue before shutdown
* lt:fix typo in validation of reject messages. Make on_choke a bit more
defensive
* lt:tighten up validation of dont-have messages
* lt:tighten up validation of reject messages, to ensure consistency of stats
counters
* lt:tighten up message size checks
* lt:update symlinks to conform to BEP 47
* lt:source code cleanup, performance and stability

1.2.0.22

* updated to OpenSSL 1.1.1b
@@ -46,7 +46,7 @@ public static String version() {
* @return the git revision
*/
public static String revision() {
return "381d5a3c5d170c7e2cbcfe231c8e6108391327d7";
return "4b268297c4cf7beefd6d90e45e2f5c2a2284a870";
}

public static int boostVersionNum() {
@@ -13,7 +13,7 @@

public static String libtorrent4jVersion() {
// extracted from the gradle with the run-swig step
return "1.2.0.22";
return "1.2.1.0";
}

static {
@@ -2972,8 +2972,7 @@ public static String libtorrent4jVersion() {
public final static native boolean peer_connection_handle_can_disconnect(long jarg1, peer_connection_handle jarg1_, long jarg2, error_code jarg2_);
public final static native boolean peer_connection_handle_has_metadata(long jarg1, peer_connection_handle jarg1_);
public final static native boolean peer_connection_handle_in_handshake(long jarg1, peer_connection_handle jarg1_);
public final static native void peer_connection_handle_send_buffer__SWIG_0(long jarg1, peer_connection_handle jarg1_, String jarg2, int jarg3, long jarg4);
public final static native void peer_connection_handle_send_buffer__SWIG_1(long jarg1, peer_connection_handle jarg1_, String jarg2, int jarg3);
public final static native void peer_connection_handle_send_buffer(long jarg1, peer_connection_handle jarg1_, String jarg2, int jarg3);
public final static native long peer_connection_handle_last_seen_complete(long jarg1, peer_connection_handle jarg1_);
public final static native boolean peer_connection_handle_op_eq(long jarg1, peer_connection_handle jarg1_, long jarg2, peer_connection_handle jarg2_);
public final static native boolean peer_connection_handle_op_ne(long jarg1, peer_connection_handle jarg1_, long jarg2, peer_connection_handle jarg2_);
@@ -139,12 +139,8 @@ public boolean in_handshake() {
return libtorrent_jni.peer_connection_handle_in_handshake(swigCPtr, this);
}

public void send_buffer(String begin, int size, long flags) {
libtorrent_jni.peer_connection_handle_send_buffer__SWIG_0(swigCPtr, this, begin, size, flags);
}

public void send_buffer(String begin, int size) {
libtorrent_jni.peer_connection_handle_send_buffer__SWIG_1(swigCPtr, this, begin, size);
libtorrent_jni.peer_connection_handle_send_buffer(swigCPtr, this, begin, size);
}

public long last_seen_complete() {

This file was deleted.

Oops, something went wrong.
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

export DEVELOPMENT_ROOT=~/Development
export BOOST_ROOT=$DEVELOPMENT_ROOT/boost_1_69_0
export BOOST_ROOT=$DEVELOPMENT_ROOT/boost_1_70_0
export LIBTORRENT_ROOT=$DEVELOPMENT_ROOT/libtorrent
export OPENSSL_ROOT=$DEVELOPMENT_ROOT/openssl-macos

@@ -1227,6 +1227,7 @@ namespace libtorrent {
%ignore libtorrent::file_storage::add_file(std::string const&, std::int64_t, std::uint32_t, std::time_t, string_view);
%ignore libtorrent::file_storage::file_range;
%ignore libtorrent::file_storage::piece_range;
%ignore libtorrent::file_storage::sanitize_symlinks;
%ignore libtorrent::create_torrent::add_url_seed(string_view);
%ignore libtorrent::create_torrent::add_http_seed(string_view);
%ignore libtorrent::create_torrent::add_tracker(string_view);

(void)jenv;
(void)jcls;
result = (int)(0);
result = (int)(1);
jresult = (jint)result;
return jresult;
}

(void)jenv;
(void)jcls;
result = (int)(((1*10000) +(2*100) +0));
result = (int)(((1*10000) +(2*100) +1));
jresult = (jint)result;
return jresult;
}

(void)jenv;
(void)jcls;
result = (char *)("1.2.0.0");
result = (char *)("1.2.1.0");
if (result) jresult = jenv->NewStringUTF((const char *)result);
return jresult;
}

(void)jenv;
(void)jcls;
result = (char *)("c76e9cc5e");
result = (char *)("f21a39496");
if (result) jresult = jenv->NewStringUTF((const char *)result);
return jresult;
}
}


SWIGEXPORT void JNICALL Java_org_libtorrent4j_swig_libtorrent_1jni_peer_1connection_1handle_1send_1buffer_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3, jlong jarg4) {
libtorrent::peer_connection_handle *arg1 = (libtorrent::peer_connection_handle *) 0 ;
char *arg2 = (char *) 0 ;
int arg3 ;
std::uint32_t arg4 ;

(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(libtorrent::peer_connection_handle **)&jarg1;
arg2 = 0;
if (jarg2) {
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
if (!arg2) return ;
}
arg3 = (int)jarg3;
arg4 = (std::uint32_t)jarg4;
{
try {
(arg1)->send_buffer((char const *)arg2,arg3,arg4);
} catch (std::exception& e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, e.what());
return ;
} catch (...) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "Unknown exception type");
return ;
}
}
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
}


SWIGEXPORT void JNICALL Java_org_libtorrent4j_swig_libtorrent_1jni_peer_1connection_1handle_1send_1buffer_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) {
SWIGEXPORT void JNICALL Java_org_libtorrent4j_swig_libtorrent_1jni_peer_1connection_1handle_1send_1buffer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) {
libtorrent::peer_connection_handle *arg1 = (libtorrent::peer_connection_handle *) 0 ;
char *arg2 = (char *) 0 ;
int arg3 ;

0 comments on commit 34f8ff5

Please sign in to comment.
You can’t perform that action at this time.