Package: sitecopy
Version: 1:0.16.3-17
Severity: important
Tags: patch

--- Please enter the report below this line. ---

I experimented several crashes with sitecopy and decided to track them
down. I found out that the progress bar of libneon was somehow involved.
It seems that even though the DISABLE_PROGRESS macro has been called the
progress bar seems to keep stay active from time to time.

Looking more precisely at the libneon API, I found out that
ne_set_progress was deprecated. See src/ne_session.h:102 which states that:

/* DEPRECATED API: Set a progress callback for the session; this is
 * deprecated in favour of ne_set_notifier().  The progress callback
 * is invoked for after each block of the request and response body to
 * indicate request and response progress (there is no way to
 * distinguish between the two using this interface alone).
 *
 * NOTE: Use of this interface is mutually exclusive with the use of
 * ne_set_notifier().  A call to ne_set_progress() removes the
 * notifier callback, and vice versa. */
void ne_set_progress(ne_session *sess,
                     ne_progress progress,
                     void *userdata);

I tried out to change the ENABLE_PROGRESS/DISABLE_PROGRESS for the new
API call (ne_set_notifier) and it went nicely on all my problematic
examples.

Therefore, I suggest the following patch:

===================================================

diff -ruN sitecopy-0.16.3-orig/src/davdriver.c
sitecopy-0.16.3/src/davdriver.c
--- sitecopy-0.16.3-orig/src/davdriver.c        2008-06-15 19:22:12.000000000 
+0200
+++ sitecopy-0.16.3/src/davdriver.c     2008-06-15 19:23:54.000000000 +0200
@@ -62,9 +62,9 @@
     const char *root;
 };

-#define ENABLE_PROGRESS do { ne_set_progress(sess,
site_sock_progress_cb, NULL); } while (0)
+#define ENABLE_PROGRESS do { ne_set_notifier(sess,
site_sock_progress_cb, NULL); } while (0)

-#define DISABLE_PROGRESS do { ne_set_progress(sess, NULL, NULL); }
while (0)
+#define DISABLE_PROGRESS do { ne_set_notifier(sess, NULL, NULL); }
while (0)

 /* TODO:
  * not really sure whether we should be using an enum here... what

===================================================

*** Please apply ***

--- System information. ---
Architecture: i386
Kernel:       Linux 2.6.25.4

Debian Release: lenny/sid
  500 unstable        ftp.fr.debian.org

--- Package information. ---
Depends         (Version) | Installed
=========================-+-============
libc6          (>= 2.7-1) | 2.7-12
libneon27     (>= 0.28.1) | 0.28.2-2




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to