Hello community,

here is the log from the commit of package btfs for openSUSE:Factory checked in 
at 2017-11-27 22:19:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/btfs (Old)
 and      /work/SRC/openSUSE:Factory/.btfs.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "btfs"

Mon Nov 27 22:19:06 2017 rev:4 rq:546040 version:2.18

Changes:
--------
--- /work/SRC/openSUSE:Factory/btfs/btfs.changes        2017-09-12 
19:54:19.336126341 +0200
+++ /work/SRC/openSUSE:Factory/.btfs.new/btfs.changes   2017-11-27 
22:19:06.245125671 +0100
@@ -1,0 +2,11 @@
+Mon Nov 27 14:19:04 UTC 2017 - [email protected]
+
+- 2.18
+  * Force DHT announce when bootstrap completes
+  * Don't set file priority to 0 at start
+  * Fix delete-on-unmount
+  * Remove unneeded debug prints
+  * Fix a potential null pointer deref
+  * Silence warning on libtorrent 1.2
+
+-------------------------------------------------------------------

Old:
----
  v2.17.tar.gz

New:
----
  v2.18.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ btfs.spec ++++++
--- /var/tmp/diff_new_pack.XEAZvQ/_old  2017-11-27 22:19:06.781106218 +0100
+++ /var/tmp/diff_new_pack.XEAZvQ/_new  2017-11-27 22:19:06.781106218 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           btfs
-Version:        2.17
+Version:        2.18
 Release:        0
 Summary:        A BitTorrent file system based on FUSE
 License:        GPL-3.0

++++++ v2.17.tar.gz -> v2.18.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btfs-2.17/src/btfs.cc new/btfs-2.18/src/btfs.cc
--- old/btfs-2.17/src/btfs.cc   2017-09-10 20:35:47.000000000 +0200
+++ new/btfs-2.18/src/btfs.cc   2017-11-25 12:40:12.000000000 +0100
@@ -99,15 +99,9 @@
 
        cursor = tail;
 
-       int pl = ti->piece_length();
-
-       for (int b = 0; b < 16 * pl; b += pl) {
+       for (int i = 0; i < 16; i++) {
                handle.piece_priority(tail++, 7);
        }
-
-       for (int o = (tail - piece) * pl; o < size + pl - 1; o += pl) {
-               handle.piece_priority(tail++, 1);
-       }
 }
 
 static void
@@ -211,9 +205,6 @@
                handle.pause();
 
        for (int i = 0; i < ti->num_files(); ++i) {
-               // Initially, don't download anything
-               handle.file_priority(i, 0);
-
                std::string parent("");
 
 #if LIBTORRENT_VERSION_NUM < 10100
@@ -222,6 +213,9 @@
                char *p = strdup(ti->files().file_path(i).c_str());
 #endif
 
+               if (!p)
+                       continue;
+
                for (char *x = strtok(p, "/"); x; x = strtok(NULL, "/")) {
                        if (strlen(x) <= 0)
                                continue;
@@ -250,7 +244,8 @@
 
 static void
 handle_read_piece_alert(libtorrent::read_piece_alert *a, Log *log) {
-       printf("%s: piece %d size %d\n", __func__, a->piece, a->size);
+       printf("%s: piece %d size %d\n", __func__, static_cast<int>(a->piece),
+               a->size);
 
        pthread_mutex_lock(&lock);
 
@@ -274,7 +269,7 @@
 
 static void
 handle_piece_finished_alert(libtorrent::piece_finished_alert *a, Log *log) {
-       printf("%s: %d\n", __func__, a->piece_index);
+       printf("%s: %d\n", __func__, static_cast<int>(a->piece_index));
 
        pthread_mutex_lock(&lock);
 
@@ -290,8 +285,6 @@
 
 static void
 handle_torrent_added_alert(libtorrent::torrent_added_alert *a, Log *log) {
-       //printf("%s()\n", __func__);
-
        pthread_mutex_lock(&lock);
 
        handle = a->handle;
@@ -305,8 +298,6 @@
 static void
 handle_metadata_received_alert(libtorrent::metadata_received_alert *a,
                Log *log) {
-       //printf("%s\n", __func__);
-
        pthread_mutex_lock(&lock);
 
        handle = a->handle;
@@ -338,14 +329,18 @@
                handle_torrent_added_alert(
                        (libtorrent::torrent_added_alert *) a, log);
                break;
+       case libtorrent::dht_bootstrap_alert::alert_type:
+               *log << a->message() << std::endl;
+               // Force DHT announce because libtorrent won't by itself
+               handle.force_dht_announce();
+               break;
+       case libtorrent::dht_announce_alert::alert_type:
+       case libtorrent::dht_reply_alert::alert_type:
        case libtorrent::metadata_failed_alert::alert_type:
        case libtorrent::tracker_announce_alert::alert_type:
        case libtorrent::tracker_reply_alert::alert_type:
        case libtorrent::tracker_warning_alert::alert_type:
        case libtorrent::tracker_error_alert::alert_type:
-       case libtorrent::dht_bootstrap_alert::alert_type:
-       case libtorrent::dht_announce_alert::alert_type:
-       case libtorrent::dht_reply_alert::alert_type:
        case libtorrent::lsd_peer_alert::alert_type:
                *log << a->message() << std::endl;
                break;
@@ -509,8 +504,6 @@
 static int
 btfs_read(const char *path, char *buf, size_t size, off_t offset,
                struct fuse_file_info *fi) {
-       //printf("%s: %s %lu %ld\n", __func__, path, size, offset);
-
        if (!is_dir(path) && !is_file(path))
                return -ENOENT;
 
@@ -687,7 +680,7 @@
        libtorrent::remove_flags_t flags = {};
 #endif
 
-       if (params.keep)
+       if (!params.keep)
                flags |= libtorrent::session::delete_files;
 
        session->remove_torrent(handle, flags);
@@ -788,7 +781,7 @@
 
        char *s = strdup(templ.c_str());
 
-       if (mkdtemp(s) != NULL) {
+       if (s != NULL && mkdtemp(s) != NULL) {
                char *x = realpath(s, NULL);
 
                if (x)


Reply via email to